mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-19 23:05:28 +00:00
8008782: NPE in TrueTypeGlyphMapper
Reviewed-by: bae, prr
This commit is contained in:
parent
19aa94ea70
commit
beb3d4af9f
@ -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()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user