Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3020,7 +3020,7 @@ class PartialEvaluator {

for (let i = 0, ii = glyphs.length; i < ii; i++) {
const glyph = glyphs[i];
const { category, originalCharCode } = glyph;
const { category } = glyph;

if (category.isInvisibleFormatMark) {
continue;
Expand All @@ -3030,7 +3030,7 @@ class PartialEvaluator {
const glyphWidth = font.vertical ? glyph.vmetric[0] : glyph.width;
let scaledDim = glyphWidth * scale;

if (originalCharCode === 0x20) {
if (glyph.isSpace) {
charSpacing += textState.wordSpacing;
}

Expand Down
6 changes: 5 additions & 1 deletion src/core/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ function amendFallbackToUnicode(properties) {

class Glyph {
constructor(
fontExtraProperties,
originalCharCode,
fontChar,
unicode,
Expand All @@ -253,7 +254,9 @@ class Glyph {
isInFont,
isRotated
) {
this.originalCharCode = originalCharCode;
if (fontExtraProperties) {
this.originalCharCode = originalCharCode;
}
this.fontChar = fontChar;
this.unicode = unicode;
this.accent = accent;
Expand Down Expand Up @@ -3672,6 +3675,7 @@ class Font {
}

glyph = new Glyph(
this.fontExtraProperties,
charcode,
fontChar,
unicode,
Expand Down
Loading