diff options
author | Jeremias Maerki <jeremias@apache.org> | 2007-11-13 12:41:24 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2007-11-13 12:41:24 +0000 |
commit | 2ef1dd3304329bc8fb2b3944a94e89c137b4bb0d (patch) | |
tree | 6e6742b72b458b245f57354cb30190281eff97e2 /src/java | |
parent | 11bac849bd4ac164c1873d36dd78ab37c8358aeb (diff) | |
download | xmlgraphics-fop-2ef1dd3304329bc8fb2b3944a94e89c137b4bb0d.tar.gz xmlgraphics-fop-2ef1dd3304329bc8fb2b3944a94e89c137b4bb0d.zip |
Some TTF fonts don't have a PostScript name, so just emulate it in this case to avoid problems with font lookup further down.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@594513 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/fonts/truetype/TTFFile.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fonts/truetype/TTFFile.java b/src/java/org/apache/fop/fonts/truetype/TTFFile.java index f46bcadd9..e46029709 100644 --- a/src/java/org/apache/fop/fonts/truetype/TTFFile.java +++ b/src/java/org/apache/fop/fonts/truetype/TTFFile.java @@ -27,6 +27,7 @@ import java.util.Set; 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 @@ public class TTFFile { * @return String The PostScript name */ public String getPostScriptName() { - return postScriptName; + if (postScriptName.length() == 0) { + return FontUtil.stripWhiteSpace(getFullName()); + } else { + return postScriptName; + } } /** |