From fbe50a47066e1facdfe122828e314f2ef3ef04a8 Mon Sep 17 00:00:00 2001 From: xwt Date: Fri, 30 Jan 2004 07:40:32 +0000 Subject: [PATCH] 2003/10/29 03:48:13 darcs-hash:20040130074032-3ac31-c7a839912f23ce0f6275830bb15fe4f1ef37f461.gz --- Makefile | 1 + src/org/xwt/Box.java.pp | 4 ++-- src/org/xwt/Glyph.java | 1 + src/org/xwt/Main.java | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a5b094f..d0361e7 100644 --- 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/%=%) diff --git a/src/org/xwt/Box.java.pp b/src/org/xwt/Box.java.pp index 72509f3..21cc5bf 100644 --- a/src/org/xwt/Box.java.pp +++ b/src/org/xwt/Box.java.pp @@ -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) { diff --git a/src/org/xwt/Glyph.java b/src/org/xwt/Glyph.java index 0cb1b29..efe2ad0 100644 --- a/src/org/xwt/Glyph.java +++ b/src/org/xwt/Glyph.java @@ -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(); } diff --git a/src/org/xwt/Main.java b/src/org/xwt/Main.java index f102939..f413578 100644 --- a/src/org/xwt/Main.java +++ b/src/org/xwt/Main.java @@ -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() { -- 1.7.10.4