Skip to content

Commit

Permalink
fix: punctuation adjustment issues in slide (#1690)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocs committed Mar 25, 2024
1 parent 6f4c525 commit 15cb6df
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -208,8 +208,13 @@ function restoreLastCJKGlyphWidth(line: IDocumentSkeletonLine) {
// Compression of punctuation marks at line start or line end
function shrinkStartAndEndCJKPunctuation(line: IDocumentSkeletonLine) {
for (const divide of line.divides) {
const glyphGroupLength = divide.glyphGroup.length;
if (glyphGroupLength < 2) {
continue;
}

const firstGlyph = divide.glyphGroup[0];
const lastGlyph = divide.glyphGroup[divide.glyphGroup.length - 1];
const lastGlyph = divide.glyphGroup[glyphGroupLength - 1];

if (isCjkRightAlignedPunctuation(firstGlyph.content)) {
const shrinkAmount = firstGlyph.adjustability.shrinkability[0];
Expand Down

0 comments on commit 15cb6df

Please sign in to comment.