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

This commit is contained in:
Jindra Petřík
2024-03-17 22:06:24 +01:00
parent 290ebda3d2
commit 4fe999bd47
9 changed files with 13 additions and 11 deletions

View File

@@ -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;