Skip to content

Commit e9e3d28

Browse files
pavel-alayyulian-gaponenko
authored andcommitted
Fix font selector issue with unknown glyphs in simple font.
DEVSIX-1319
1 parent a965dee commit e9e3d28

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/src/main/java/com/itextpdf/kernel/font/PdfSimpleFont.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ public int appendGlyphs(String text, int from, int to, List<Glyph> glyphs) {
128128
if (glyph != null && (containsGlyph(text, i) || isAppendableGlyph(glyph))) {
129129
glyphs.add(glyph);
130130
processed++;
131+
} else if (glyph == null && TextUtil.isWhitespaceOrNonPrintable((int) text.charAt(i))) {
132+
processed++;
131133
} else {
132134
break;
133135
}

0 commit comments

Comments
 (0)