Fixed #1748 Wrong glyphadvance of DefineEditText fonts for rendering

Added DSSReader to Netbeans Lib project
This commit is contained in:
Jindra Petřík
2021-11-17 09:17:30 +01:00
parent a342bf7c78
commit 83222d4574
2 changed files with 2 additions and 2 deletions

View File

@@ -1052,7 +1052,7 @@ public class DefineEditTextTag extends TextTag {
String fontName = ge.fontFace != null ? ge.fontFace : FontTag.getDefaultFontName();
int fontStyle = font == null ? ge.fontStyle : font.getFontStyle();
ge.glyphAdvance = font == null ? (int) Math.round(SWF.unitDivisor * FontTag.getSystemFontAdvance(fontName, fontStyle, (int) (lastStyle.fontHeight / SWF.unitDivisor), c, nextChar))
: (int) (font.getGlyphAdvance(ge.glyphIndex) / font.getDivider());
: (int) Math.round(font.getGlyphAdvance(ge.glyphIndex) / font.getDivider() * lastStyle.fontHeight / 1024);
textModel.addGlyph(c, ge);
if (Character.isWhitespace(c)) {