2004/01/13 19:27:16
[org.ibex.core.git] / src / org / xwt / Font.java
index bd11c4f..2d9fcd7 100644 (file)
@@ -66,7 +66,10 @@ public class Font {
         for(int i=0; i<text.length(); i++) {
             final char c = text.charAt(i);
             Glyph g = glyphs[c];
-            if (g == null) glyphs[c] = g = Platform.createGlyph(this, c);    // prepend so they are high priority
+            if (g == null) {
+                g = Platform.createGlyph(this, c);    // prepend so they are high priority
+                glyphs[c] = g;
+            }
             if (!g.isLoaded) {
                 glyphsToBeRendered.prepend(g);              // even if it's already in the queue, boost its priority
                 encounteredUnrenderedGlyph = true;
@@ -122,7 +125,6 @@ public class Font {
         if (g.isLoaded) { perform(); /* tailcall to the next glyph */ return; }
         //Log.info(Glyph.class, "rendering glyph " + g.c);
         try { freetype.renderGlyph(g); } catch (IOException e) { Log.info(Freetype.class, e); }
-        g.isLoaded = true;
         Scheduler.add(this);          // keep ourselves in the queue until there are no glyphs to render
         glyphRenderingTaskIsScheduled = true;
     } };