font export fix

This commit is contained in:
honfika@gmail.com
2015-03-27 14:31:34 +01:00
parent 8a4736fce8
commit e4efcc6068
2 changed files with 22 additions and 2 deletions

View File

@@ -149,8 +149,15 @@ public class FontExporter {
f.setAuthor(ApplicationInfo.shortApplicationVerName);
f.setVersion("1.0");
f.setAscender(Math.round(t.getAscent() / divider));
f.setDescender(Math.round(t.getDescent() / divider));
int ascent = t.getAscent();
if (ascent != -1) {
f.setAscender(Math.round(ascent / divider));
}
int descent = t.getDescent();
if (descent != -1) {
f.setDescender(Math.round(descent / divider));
}
int glyphCount = 0;
for (int i = 0; i < shapes.size(); i++) {