2003/12/16 22:15:41
[org.ibex.core.git] / src / org / xwt / Box.java
index 5187dc0..a98e052 100644 (file)
@@ -61,7 +61,14 @@ public final class Box extends JSScope implements Scheduler.Task {
 
     static Hash boxToCursor = new Hash(500, 3);
     public static final int MAX_LENGTH = Integer.MAX_VALUE;
-    static final Font DEFAULT_FONT = Font.getFont((Res)Main.builtin.get("fonts/vera/Vera.ttf"), 10);
+    static final Font DEFAULT_FONT;
+   
+    static {
+        Font f = null;
+        try { f = Font.getFont((Res)Main.builtin.get("fonts/vera/Vera.ttf"), 10); }
+        catch(JSExn e) { Log.log(Box.class, "should never happen: "+e); }
+        DEFAULT_FONT = f;
+    }
 
     // box properties can not be trapped
     static final String[] props = new String[] {