Issue #395 Fixed GFx chars advance

This commit is contained in:
Jindra Petk
2013-09-23 21:25:19 +02:00
parent ec4418c987
commit 5297458ca4

View File

@@ -223,7 +223,7 @@ public class GFxDefineCompactedFont extends FontTag implements DrawableTag {
FontTag.shiftGlyphIndices(fontId, pos, tags);
}
Font fnt = new Font(fontName, fontStyle, 20 * font.nominalSize);
Font fnt = new Font(fontName, fontStyle, font.nominalSize);
int advance = (int) Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(), "" + character).getGlyphMetrics(0).getAdvanceX());
if (!exists) {
font.glyphInfo.add(pos, new GlyphInfoType(code, advance, 0));