2003/09/19 08:33:46
[org.ibex.core.git] / src / org / xwt / Glyph.java
index 0a75b0b..fdde61d 100644 (file)
@@ -1,13 +1,15 @@
 // Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL]
 package org.xwt;
 import org.xwt.translators.*;
+import org.xwt.util.*;
 
 public class Glyph {
-    char c;
-    int line_height;    // same value for every glyph in font; the max height of all chars
-    int baseline;       // within the picture, this is the y-coordinate of the baseline
-    int advance;        // amount to increment the x-coordinate
-    Picture p;
+    public char c;
+    public int max_ascent;     // same value for every glyph in font; the max ascent of all chars
+    public int max_descent;    // same value for every glyph in font; the max descent of all chars
+    public int baseline;       // within the picture, this is the y-coordinate of the baseline
+    public int advance;        // amount to increment the x-coordinate
+    public Picture p;
 
     // k1=font.res k2=(c << 16 | pointsize)
     private static Cache glyphCache = new Cache();
@@ -18,9 +20,9 @@ public class Glyph {
 
         // FEATURE: be smarter here
         if (c < 256)
-            org.xwt.translators.Font.renderGlyphs(res, pointsize, 0, 255, glyphCache);
+            Font.renderGlyphs(res, pointsize, 0, 255, glyphCache);
         else
-            org.xwt.translators.Font.renderGlyphs(res, pointsize, (int)c, (int)c, glyphCache);
+            Font.renderGlyphs(res, pointsize, (int)c, (int)c, glyphCache);
 
         ret = (Glyph)glyphCache.get(res, new Integer((((int)c) << 16) | pointsize));
         if (ret != null) return ret;