Glyph g = (Glyph)glyphsToBeRendered.remove(false);
if (g == null) { glyphRenderingTaskIsScheduled = false; return; }
Log.debug(Font.class, "glyphRenderingTask dequeued glyph " + g.c + " of font " + g.font);
- if (g.isLoaded) { perform(); /* tailcall to the next glyph */ return; }
- Log.debug(Glyph.class, "rendering glyph " + g.c);
- try { freetype.renderGlyph(g); } catch (IOException e) { Log.info(Freetype.class, e); }
+ if (!g.isLoaded) {
+ Log.debug(Glyph.class, "rendering glyph " + g.c);
+ try { freetype.renderGlyph(g); } catch (IOException e) { Log.info(Freetype.class, e); }
+ }
Scheduler.add(this); // keep ourselves in the queue until there are no glyphs to render
glyphRenderingTaskIsScheduled = true;
} };