X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2FFont.java;h=48fd0dee7038a2d9534296adf916be41ed9deb4d;hb=4052bf6501ced1a941a66108e87262da033f33af;hp=cd1ff809188e77bd94fb1d8986c5ffbd2a9fc5a3;hpb=ccf0715e9a34f491fa2c52f5f1ba90fd371b7c51;p=org.ibex.core.git diff --git a/src/org/ibex/Font.java b/src/org/ibex/Font.java index cd1ff80..48fd0de 100644 --- a/src/org/ibex/Font.java +++ b/src/org/ibex/Font.java @@ -1,8 +1,10 @@ // 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 @@ -36,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)); @@ -62,48 +65,51 @@ public class Font { final Scheduler.Task callback) { boolean encounteredUnrenderedGlyph = false; int width = 0, height = 0; - for(int i=0; i