]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Throw exception if glyf table is not found (currently happens with some OTF font...
authorBertrand Delacretaz <bdelacretaz@apache.org>
Tue, 10 Oct 2006 09:15:06 +0000 (09:15 +0000)
committerBertrand Delacretaz <bdelacretaz@apache.org>
Tue, 10 Oct 2006 09:15:06 +0000 (09:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@454669 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fonts/truetype/TTFFile.java

index 6a20e2bb94b71f019f16220f0025c51ea773e04c..3ff335a4a753fa5e8fc6a1d7cbd91b7a98609589 100644 (file)
@@ -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());