diff options
author | Peter Bernard West <pbwest@apache.org> | 2004-03-18 04:49:07 +0000 |
---|---|---|
committer | Peter Bernard West <pbwest@apache.org> | 2004-03-18 04:49:07 +0000 |
commit | 0c7287c422c03115eefaf427d58f924bd9de911e (patch) | |
tree | 98e41c658bf081a70882fc9d14f4618043f50943 | |
parent | 4da56204cb4eb801d6ca0542107e9b8e8f205809 (diff) | |
download | xmlgraphics-fop-0c7287c422c03115eefaf427d58f924bd9de911e.tar.gz xmlgraphics-fop-0c7287c422c03115eefaf427d58f924bd9de911e.zip |
Updated details on getAscender bug
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197461 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/render/awt/AWTFontMetrics.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/render/awt/AWTFontMetrics.java b/src/java/org/apache/fop/render/awt/AWTFontMetrics.java index 4d0ec8d08..fdfd8b826 100644 --- a/src/java/org/apache/fop/render/awt/AWTFontMetrics.java +++ b/src/java/org/apache/fop/render/awt/AWTFontMetrics.java @@ -115,6 +115,23 @@ public class AWTFontMetrics { // workaround for sun bug on FontMetrics.getAscent() // http://developer.java.sun.com/developer/bugParade/bugs/4399887.html + /* + * Bug 4399887 has status Closed, not a bug. The comments on the bug + * are: + * The submitter is incorrectly assuming that the string he has used + * is displaying characters which represent those with the maximum + * ascent in the font. If (for example) the unicode character + * \u00c1 which is the A-acute character used in many European + * languages is placed in the bodu of the "Wrong" string it can be + * seen that the JDK is exactly correct in its determination of the + * ascent of the font. + * If the bounds of a particular string are interesting then the + * Rectangle FontMetrics.getStringBounds(..) method can be called. + * The y value of the rectangle is the offset from the origin + * (baseline) apparently needed by the sample test program + * + * xxxxx@xxxxx 2001-05-15 + */ int realAscent = fmt.getAscent() - (fmt.getDescent() + fmt.getLeading()); return FONT_FACTOR * realAscent; |