-// Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL]
+// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL]
package org.xwt;
import org.xwt.translators.*;
import org.xwt.util.*;
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;
Glyph g = (Glyph)glyphsToBeRendered.remove(false);
if (g == null) { glyphRenderingTaskIsScheduled = false; return; }
if (g.isLoaded) { perform(); /* tailcall to the next glyph */ return; }
- Log.info(Glyph.class, "rendering glyph " + g.c);
+ //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;
} };