You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by pb...@apache.org on 2004/03/16 13:02:37 UTC

cvs commit: xml-fop/src/java/org/apache/fop/render/awt AWTFontMetrics.java

pbwest      2004/03/16 04:02:37

  Modified:    src/java/org/apache/fop/render/awt Tag:
                        FOP_0-20-0_Alt-Design AWTFontMetrics.java
  Log:
  Assume getAscent bug is now fixed
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.2   +7 -6      xml-fop/src/java/org/apache/fop/render/awt/AWTFontMetrics.java
  
  Index: AWTFontMetrics.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/awt/AWTFontMetrics.java,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- AWTFontMetrics.java	10 Mar 2004 06:24:28 -0000	1.2.2.1
  +++ AWTFontMetrics.java	16 Mar 2004 12:02:37 -0000	1.2.2.2
  @@ -111,13 +111,13 @@
        */
       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 @@
           // 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 {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org