2003/12/29 22:29:29
[org.ibex.core.git] / src / org / xwt / Font.java
index 5124a7a..deb3c07 100644 (file)
@@ -9,12 +9,12 @@ import java.io.*;
 /** 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
@@ -39,7 +39,7 @@ public class Font {
     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;