2003/10/29 03:48:13
authorxwt <xwt@xwt.org>
Fri, 30 Jan 2004 07:40:32 +0000 (07:40 +0000)
committerxwt <xwt@xwt.org>
Fri, 30 Jan 2004 07:40:32 +0000 (07:40 +0000)
darcs-hash:20040130074032-3ac31-c7a839912f23ce0f6275830bb15fe4f1ef37f461.gz

Makefile
src/org/xwt/Box.java.pp
src/org/xwt/Glyph.java
src/org/xwt/Main.java

index a5b094f..d0361e7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -142,6 +142,7 @@ builtin_src := $(shell find src/org/xwt/builtin -name '*.*')
 build/res/fonts/vera: .download_vera-1.10
        mkdir -p build/res/fonts/vera
        cd build/res/fonts/vera; ln -s ../../../../upstream/vera-1.10/ttf-bitstream-vera-1.10/Vera.ttf
+       cd build/res/fonts/vera; ln -s ../../../../upstream/vera-1.10/ttf-bitstream-vera-1.10/VeraBd.ttf
 build/res/builtin.jar: $(builtin_src:src/%=build/res/%) build/res/freetype.mips build/res/libmspack.mips build/res/fonts/vera
        @echo -e "\n\033[1mzipping            res/* -> .jar: builtin.jar\033[0m"
        cd build/res; $(jar) cf builtin.jar $(^:build/res/%=%)
index 72509f3..21cc5bf 100644 (file)
@@ -512,7 +512,7 @@ public final class Box extends JS.Scope {
            if (g != null) {
                int top = y + g.max_ascent - g.baseline + g.max_descent;
                if (g.p != null)
-                   buf.drawPictureAlphaOnly(g.p, x, top + 4,
+                   buf.drawPictureAlphaOnly(g.p, x, top,
                                             clipx, clipy, clipx + clipw, clipy + cliph, textcolor);
                x += g.advance;
            } else {
@@ -871,7 +871,7 @@ public final class Box extends JS.Scope {
                            } });
                } else {
                    textwidth += g.advance;
-                   textheight = g.max_ascent;
+                   textheight = max(textheight, g.max_ascent + g.max_descent);
                }
             }
         } catch (Exception e) {
index 0cb1b29..efe2ad0 100644 (file)
@@ -29,6 +29,7 @@ public class Glyph {
            else Freetype.renderGlyphs(res, pointsize, (int)c, (int)c, glyphCache);
            if ((Glyph)glyphCache.get(res, new Integer((((int)c) << 16) | pointsize)) == null)
                throw new JS.Exn("error rendering glyph " + c + "; glyph is null");
+           Log.log(Freetype.class, "    done rendering glyphs for font " + res.getDescriptiveName());
        }
        ThreadMessage.resumeThread();
     }
index f102939..f413578 100644 (file)
@@ -25,7 +25,7 @@ public class Main {
     public static String originHost = null;
     public static String origin = null;
     
-    public static final Res builtin = new Res.Builtin();
+    public static final Res builtin = new Res.Zip(new Res.Builtin());
     public static Picture scarImage = null;
 
     public static void printUsage() {