/** encapsulates a single font (a set of Glyphs) */
public class Font {
- private Font(Res res, int pointsize) { this.res = res; this.pointsize = pointsize; }
+ private Font(Stream res, int pointsize) { this.res = res; this.pointsize = pointsize; }
private static boolean glyphRenderingTaskIsScheduled = false;
public final int pointsize; ///< the size of the font
- public final Res res; ///< the resource from which this font was loaded
+ public final Stream res; ///< the resource from which this font was loaded
public int max_ascent; ///< the maximum ascent, in pixels
public int max_descent; ///< the maximum descent, in pixels
boolean latinCharsPreloaded = false; ///< true if a request to preload ASCII 32-127 has begun
private static final Freetype freetype = new Freetype();
static final Queue glyphsToBeRendered = new Queue(255);
private static Cache fontCache = new Cache(100);
- public static Font getFont(Res res, int pointsize) {
+ public static Font getFont(Stream res, int pointsize) {
Font ret = (Font)fontCache.get(res, new Integer(pointsize));
if (ret == null) fontCache.put(res, new Integer(pointsize), ret = new Font(res, pointsize));
return ret;