xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r594513 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFFile.java
Date Tue, 13 Nov 2007 12:41:25 GMT
Author: jeremias
Date: Tue Nov 13 04:41:24 2007
New Revision: 594513

URL: http://svn.apache.org/viewvc?rev=594513&view=rev
Log:
Some TTF fonts don't have a PostScript name, so just emulate it in this case to avoid problems
with font lookup further down.

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

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFFile.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFFile.java?rev=594513&r1=594512&r2=594513&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 Tue Nov 13 04:41:24
2007
@@ -27,6 +27,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.fop.fonts.FontUtil;
 import org.apache.fop.fonts.Glyphs;
 
 /**
@@ -543,7 +544,11 @@
      * @return String The PostScript name
      */
     public String getPostScriptName() {
-        return postScriptName;
+        if (postScriptName.length() == 0) {
+            return FontUtil.stripWhiteSpace(getFullName());
+        } else {
+            return postScriptName;
+        }
     }
 
     /**



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


Mime
View raw message