aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fonts
diff options
context:
space:
mode:
authorBertrand Delacretaz <bdelacretaz@apache.org>2006-10-10 09:15:06 +0000
committerBertrand Delacretaz <bdelacretaz@apache.org>2006-10-10 09:15:06 +0000
commitd2b050a7f706c5c8a751e48a0bc953dcf8646d01 (patch)
treeee95284425736f8d69a681f8240fda7365ed15f4 /src/java/org/apache/fop/fonts
parent9ace957bd04b125499ce2d8223998a28d86191b0 (diff)
downloadxmlgraphics-fop-d2b050a7f706c5c8a751e48a0bc953dcf8646d01.tar.gz
xmlgraphics-fop-d2b050a7f706c5c8a751e48a0bc953dcf8646d01.zip
Throw exception if glyf table is not found (currently happens with some OTF font files)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@454669 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fonts')
-rw-r--r--src/java/org/apache/fop/fonts/truetype/TTFFile.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fonts/truetype/TTFFile.java b/src/java/org/apache/fop/fonts/truetype/TTFFile.java
index 6a20e2bb9..3ff335a4a 100644
--- a/src/java/org/apache/fop/fonts/truetype/TTFFile.java
+++ b/src/java/org/apache/fop/fonts/truetype/TTFFile.java
@@ -946,6 +946,7 @@ public class TTFFile {
*/
private final void readGlyf(FontFileReader in) throws IOException {
TTFDirTabEntry dirTab = (TTFDirTabEntry)dirTabs.get("glyf");
+ if(dirTab==null) throw new IOException("glyf table not found, cannot continue");
for (int i = 0; i < (numberOfGlyphs - 1); i++) {
if (mtxTab[i].getOffset() != mtxTab[i + 1].getOffset()) {
in.seekSet(dirTab.getOffset() + mtxTab[i].getOffset());