diff --git a/fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GlyphSubstitutionDataExtractor.java b/fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GlyphSubstitutionDataExtractor.java index b4a15dda796..c6da65ac09e 100644 --- a/fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GlyphSubstitutionDataExtractor.java +++ b/fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GlyphSubstitutionDataExtractor.java @@ -220,8 +220,8 @@ private void extractDataFromSingleSubstTableFormat2Table( if (coverageTable.getSize() != singleSubstTableFormat2.getSubstituteGlyphIDs().length) { - throw new IllegalArgumentException( - "The no. coverage table entries should be the same as the size of the substituteGlyphIDs"); + LOG.warn("The no. coverage table entries should be the same as the size of the substituteGlyphIDs"); + return; } for (int i = 0; i < coverageTable.getSize(); i++) @@ -242,8 +242,8 @@ private void extractDataFromMultipleSubstitutionFormat1Table( if (coverageTable.getSize() != multipleSubstFormat1Subtable.getSequenceTables().length) { - throw new IllegalArgumentException( - "The no. coverage table entries should be the same as the size of the sequencce tables"); + LOG.warn("The no. coverage table entries should be the same as the size of the sequencce tables"); + return; } for (int i = 0; i < coverageTable.getSize(); i++)