--- a/jdk/src/share/classes/sun/font/TrueTypeFont.java Mon Jul 22 12:52:15 2013 -0700
+++ b/jdk/src/share/classes/sun/font/TrueTypeFont.java Wed Jul 24 13:38:17 2013 +0400
@@ -547,6 +547,17 @@
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()) {