case "ui": return getSub("ui");
case "ui.font": return getSub("ui.font");
case "ui.font.wait": return METHOD;
+ case "ui.font.width": return METHOD;
+ case "ui.font.height": return METHOD;
case "ui.font.sansserif": return Main.builtin.get("fonts/vera/Vera.ttf");
case "ui.font.monospace": return Main.builtin.get("fonts/vera/VeraMono.ttf");
case "ui.font.serif": return Main.builtin.get("fonts/vera/VeraSe.ttf");
//#end
case 3:
//#switch(name)
- case "font.wait":
+ case "ui.font.height": return N(Font.getFont((Stream)a, JS.toInt(b)).textheight((String)c));
+ case "ui.font.wait":
try {
JS.UnpauseCallback callback = JS.pause();
Font font = Font.getFont((Stream)a, JS.toInt(b));
} catch (JS.NotPauseableException npe) {
JS.error("can't wait for a font in a foreground thread");
}
+ return null;
+ case "ui.font.width": return N(Font.getFont((Stream)a, JS.toInt(b)).textwidth((String)c));
//#end
break;
}
throw new JSExn("invalid argument for ibex object method "+name+"()");
}
- throw new JSExn("invalid number of arguments for ibex object method "+name+"()");
+ throw new JSExn("invalid number of arguments ("+nargs+") for ibex object method "+name+"()");
}
public Stream url2res(String url) throws JSExn {