2003/10/29 03:48:13
[org.ibex.core.git] / src / org / xwt / Box.java.pp
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) {