El0sua
Committed by David PHAM-VAN

Fix an issue when using unicode font like Chinese.

According to apple's document about 'heea' and 'maxp', these two fields should be unsigned int16.

https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6maxp.html
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6hhea.html
@@ -89,9 +89,9 @@ class TtfParser { @@ -89,9 +89,9 @@ class TtfParser {
89 89
90 int get descent => bytes.getInt16(tableOffsets[hhea_table] + 6); 90 int get descent => bytes.getInt16(tableOffsets[hhea_table] + 6);
91 91
92 - int get numOfLongHorMetrics => bytes.getInt16(tableOffsets[hhea_table] + 34); 92 + int get numOfLongHorMetrics => bytes.getUint16(tableOffsets[hhea_table] + 34);
93 93
94 - int get numGlyphs => bytes.getInt16(tableOffsets[maxp_table] + 4); 94 + int get numGlyphs => bytes.getUint16(tableOffsets[maxp_table] + 4);
95 95
96 String get fontName => _fontName; 96 String get fontName => _fontName;
97 97