X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2FFont.java;h=48fd0dee7038a2d9534296adf916be41ed9deb4d;hb=1e2ac9c2eef012a3e77133817803878bacfa91b8;hp=2744f0e11b105b7bf3c3ccd9f86916933272d48a;hpb=3591b88b94a6bb378af3d4abe6eb5233ce583104;p=org.ibex.core.git diff --git a/src/org/ibex/Font.java b/src/org/ibex/Font.java index 2744f0e..48fd0de 100644 --- a/src/org/ibex/Font.java +++ b/src/org/ibex/Font.java @@ -1,8 +1,11 @@ // Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL] package org.ibex; -import org.xwt.translators.*; +import org.ibex.translators.*; import org.ibex.util.*; import java.io.*; +import java.util.Hashtable; + +import org.ibex.js.JSExn; // FEATURE: this could be cleaner /** encapsulates a single font (a set of Glyphs) */ @@ -35,7 +38,8 @@ public class Font { // Statics ////////////////////////////////////////////////////////////////////// private static final Freetype freetype = new Freetype(); - static final Queue glyphsToBeRendered = new Queue(255); + static final Hashtable glyphsToBeCached = new Hashtable(); + static final Hashtable glyphsToBeDisplayed = new Hashtable(); private static Cache fontCache = new Cache(100); public static Font getFont(Stream stream, int pointsize) { Font ret = (Font)fontCache.get(stream, new Integer(pointsize)); @@ -61,48 +65,51 @@ public class Font { final Scheduler.Task callback) { boolean encounteredUnrenderedGlyph = false; int width = 0, height = 0; - for(int i=0; i