Fixed #2211 PDF export, Font export - glyphs with no contours (advance only)

This commit is contained in:
Jindra Petřík
2024-08-05 11:17:25 +02:00
parent 290ebda3d2
commit 4fe999bd47
9 changed files with 13 additions and 11 deletions
@@ -609,11 +609,8 @@ public class DualPdfGraphics2D extends Graphics2D implements BlendModeSetable, G
int spacing = entry.glyphAdvance - calcAdvance;
char ch = font.glyphToChar(entry.glyphIndex);
if (spacing != 0) {
if (text.length() > 0) {
drawText(x, y, trans, textColor, existingFonts, font, text.toString(), textHeight, pdfGraphics);
}
drawText(x + deltaX, y, trans, textColor, existingFonts, font, "" + currentChar, textHeight, pdfGraphics);
text.append(currentChar);
drawText(x, y, trans, textColor, existingFonts, font, text.toString(), textHeight, pdfGraphics);
text = new StringBuilder();
x = x + deltaX + entry.glyphAdvance;
deltaX = 0;