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 je...@apache.org on 2006/03/01 18:26:24 UTC

svn commit: r382089 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/fonts/truetype/TTFFile.java status.xml

Author: jeremias
Date: Wed Mar  1 09:26:21 2006
New Revision: 382089

URL: http://svn.apache.org/viewcvs?rev=382089&view=rev
Log:
Bugfix: Fixed a problem with certain TrueType fonts which are missing the "PCLT" table, where a baseline-shift="sub" had no effect due to a missing x-height value.
(Note: This only affects TTFReader, so the font metric file has to be regenerated.)

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFFile.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFFile.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFFile.java?rev=382089&r1=382088&r2=382089&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFFile.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFFile.java Wed Mar  1 09:26:21 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2004,2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -1043,9 +1043,13 @@
             // This also assumes that psocriptnames exists ("H")
             // Should look it up int the cmap (that wouldn't help
             // for charsets without H anyway...)
+            // Same for xHeight with the letter "x"
             for (int i = 0; i < mtxTab.length; i++) {
                 if ("H".equals(mtxTab[i].getName())) {
                     capHeight = mtxTab[i].getBoundingBox()[3] - mtxTab[i].getBoundingBox()[1];
+                }
+                if ("x".equals(mtxTab[i].getName())) {
+                    xHeight = mtxTab[i].getBoundingBox()[3] - mtxTab[i].getBoundingBox()[1];
                 }
             }
         }

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/status.xml?rev=382089&r1=382088&r2=382089&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Wed Mar  1 09:26:21 2006
@@ -28,6 +28,11 @@
   <changes>
     <release version="FOP Trunk">
       <action context="Code" dev="JM" type="fix">
+        Bugfix: Fixed a problem with certain TrueType fonts which are missing the "PCLT"
+        table, where a baseline-shift="sub" had no effect due to a missing x-height value.
+        (Note: This only affects TTFReader, so the font metric file has to be regenerated.)
+      </action>
+      <action context="Code" dev="JM" type="fix">
         Bugfix: When the base URL was specified as a file system path, the constructed
         URL was wrong.
       </action>



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