8008782: NPE in TrueTypeGlyphMapper

Reviewed-by: bae, prr
This commit is contained in:
Vadim Pakhnushev 2013-07-24 13:38:17 +04:00
parent 19aa94ea70
commit beb3d4af9f

View File

@ -547,6 +547,17 @@ public class TrueTypeFont extends FileFont {
throw new FontFormatException("bad table, tag="+table.tag);
}
}
if (getDirectoryEntry(headTag) == null) {
throw new FontFormatException("missing head table");
}
if (getDirectoryEntry(maxpTag) == null) {
throw new FontFormatException("missing maxp table");
}
if (getDirectoryEntry(hmtxTag) != null
&& getDirectoryEntry(hheaTag) == null) {
throw new FontFormatException("missing hhea table");
}
initNames();
} catch (Exception e) {
if (FontUtilities.isLogging()) {