diff options
author | Jeremias Maerki <jeremias@apache.org> | 2003-02-13 17:10:59 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2003-02-13 17:10:59 +0000 |
commit | ca4dd6f16a02dea66a72ed30bc2c1af8df086764 (patch) | |
tree | 9d49ee7b797ea724f7ce22c694cabae6ba5382be /src/org/apache/fop | |
parent | af8f62cedecec562c874f816235fde688627aaa0 (diff) | |
download | xmlgraphics-fop-ca4dd6f16a02dea66a72ed30bc2c1af8df086764.tar.gz xmlgraphics-fop-ca4dd6f16a02dea66a72ed30bc2c1af8df086764.zip |
TrueType embedding: FPGM table is optional, so ignore it if it's not there.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195942 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop')
-rw-r--r-- | src/org/apache/fop/fonts/truetype/TTFSubSetFile.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/org/apache/fop/fonts/truetype/TTFSubSetFile.java b/src/org/apache/fop/fonts/truetype/TTFSubSetFile.java index 8014cf48e..0ee5bd926 100644 --- a/src/org/apache/fop/fonts/truetype/TTFSubSetFile.java +++ b/src/org/apache/fop/fonts/truetype/TTFSubSetFile.java @@ -88,10 +88,12 @@ public class TTFSubSetFile extends TTFFile { currentPos += 12; realSize += 16; - writeString("fpgm"); - fpgmDirOffset = currentPos; - currentPos += 12; - realSize += 16; + if (hasFpgm()) { + writeString("fpgm"); + fpgmDirOffset = currentPos; + currentPos += 12; + realSize += 16; + } writeString("glyf"); glyfDirOffset = currentPos; @@ -153,6 +155,10 @@ public class TTFSubSetFile extends TTFFile { } + private boolean hasFpgm() { + return (dirTabs.get("fpgm") != null); + } + /** * Copy the fpgm table as is from original font to subset font @@ -171,7 +177,8 @@ public class TTFSubSetFile extends TTFFile { currentPos += (int)entry.getLength(); realSize += (int)entry.getLength(); } else { - throw new IOException("Can't find fpgm table"); + //fpgm table is optional + //throw new IOException("Can't find fpgm table"); } } |