]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Assume getAscent bug is now fixed
authorPeter Bernard West <pbwest@apache.org>
Tue, 16 Mar 2004 12:02:37 +0000 (12:02 +0000)
committerPeter Bernard West <pbwest@apache.org>
Tue, 16 Mar 2004 12:02:37 +0000 (12:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197453 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/awt/AWTFontMetrics.java

index 928e4032c4cc5fa63bd7cd6bf98ae790880dfd3f..af5adc8b1a118dee5952909f32cff303dbf75e50 100644 (file)
@@ -111,13 +111,13 @@ public class AWTFontMetrics {
      */
     public int getAscender(String family, int style, int size) {
         setFont(family, style, size);
-        // return (int)(FONT_FACTOR * fmt.getAscent());
+        return FONT_FACTOR * fmt.getAscent();
 
-        // workaround for sun bug on FontMetrics.getAscent()
-        // http://developer.java.sun.com/developer/bugParade/bugs/4399887.html
-        int realAscent = fmt.getAscent()
-                         - (fmt.getDescent() + fmt.getLeading());
-        return FONT_FACTOR * realAscent;
+//        // workaround for sun bug on FontMetrics.getAscent()
+//        // http://developer.java.sun.com/developer/bugParade/bugs/4399887.html
+//        int realAscent = fmt.getAscent()
+//                         - (fmt.getDescent() + fmt.getLeading());
+//        return FONT_FACTOR * realAscent;
     }
 
 
@@ -175,6 +175,7 @@ public class AWTFontMetrics {
         // the output seems to look a little better if the
         // space is rendered larger than given by
         // the FontMetrics object
+        // TODO find out why
         if (i <= 32) {
             w = (int)(1.4 * fmt.charWidth(i) * FONT_FACTOR);
         } else {