--- a/jdk/src/share/classes/sun/font/TrueTypeFont.java Fri Feb 20 13:48:32 2009 +0300
+++ b/jdk/src/share/classes/sun/font/TrueTypeFont.java Tue Mar 03 16:10:37 2009 -0800
@@ -174,8 +174,17 @@
super(platname, nativeNames);
useJavaRasterizer = javaRasterizer;
fontRank = Font2D.TTF_RANK;
- verify();
- init(fIndex);
+ try {
+ verify();
+ init(fIndex);
+ } catch (Throwable t) {
+ close();
+ if (t instanceof FontFormatException) {
+ throw (FontFormatException)t;
+ } else {
+ throw new FontFormatException("Unexpected runtime exception.");
+ }
+ }
Disposer.addObjectRecord(this, disposerRecord);
}