font ascent and descent values should be non-negative

This commit is contained in:
honfika@gmail.com
2015-03-31 19:02:56 +02:00
parent 5a95cc26f5
commit b7a8adc643
2 changed files with 4 additions and 4 deletions

View File

@@ -282,8 +282,8 @@ public class DefineFont2Tag extends FontTag {
}
if (fontFlagsHasLayout) {
fontAscent = sis.readSI16("fontAscent");
fontDescent = sis.readSI16("fontDescent");
fontAscent = sis.readUI16("fontAscent");
fontDescent = sis.readUI16("fontDescent");
fontLeading = sis.readSI16("fontLeading");
fontAdvanceTable = new ArrayList<>();
for (int i = 0; i < numGlyphs; i++) {

View File

@@ -192,8 +192,8 @@ public class DefineFont3Tag extends FontTag {
}
}
if (fontFlagsHasLayout) {
fontAscent = sis.readSI16("fontAscent");
fontDescent = sis.readSI16("fontDescent");
fontAscent = sis.readUI16("fontAscent");
fontDescent = sis.readUI16("fontDescent");
fontLeading = sis.readSI16("fontLeading");
fontAdvanceTable = new ArrayList<>();
for (int i = 0; i < numGlyphs; i++) {