ibex.core updates for new api
[org.ibex.core.git] / src / org / ibex / core / Box.java
index 29cd9bc..151654b 100644 (file)
@@ -57,7 +57,11 @@ public final class Box extends JSScope implements Task {
     // FIXME memory leak
     static Hash boxToCursor = new Hash(500, 3);
 
-    static final Font DEFAULT_FONT = Font.getFont((Stream)Main.builtin.get(JS.S("fonts/vera/Vera.ttf")), 10);
+    static final Font DEFAULT_FONT;
+    static {
+        try { DEFAULT_FONT = Font.getFont(Main.builtin.get(JS.S("fonts/vera/Vera.ttf")), 10); }
+        catch(JSExn e) { throw new Error("Error loading default font: " + e); }
+    }
 
 
     // Flags //////////////////////////////////////////////////////////////////////