From: Bertrand Delacretaz Date: Tue, 10 Oct 2006 09:15:06 +0000 (+0000) Subject: Throw exception if glyf table is not found (currently happens with some OTF font... X-Git-Tag: fop-0_93~63 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d2b050a7f706c5c8a751e48a0bc953dcf8646d01;p=xmlgraphics-fop.git 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 --- 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());