From ab36ca80fe6a92ec52fa22c270533cff96b5bdb5 Mon Sep 17 00:00:00 2001 From: vivek Date: Sun, 19 Nov 2023 15:52:34 -0400 Subject: [PATCH] push down method refactoring. --- .../src/main/java/org/apache/fontbox/ttf/OTFParser.java | 3 +-- .../src/main/java/org/apache/fontbox/ttf/TTFParser.java | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/fontbox/src/main/java/org/apache/fontbox/ttf/OTFParser.java b/fontbox/src/main/java/org/apache/fontbox/ttf/OTFParser.java index 3ac562d03b2..b88e8d20359 100644 --- a/fontbox/src/main/java/org/apache/fontbox/ttf/OTFParser.java +++ b/fontbox/src/main/java/org/apache/fontbox/ttf/OTFParser.java @@ -62,7 +62,6 @@ OpenTypeFont newFont(TTFDataStream raf) return new OpenTypeFont(raf); } - @Override protected TTFTable readTable(String tag) { // todo: this is a stub, a full implementation is needed @@ -77,7 +76,7 @@ protected TTFTable readTable(String tag) case CFFTable.TAG: return new CFFTable(); default: - return super.readTable(tag); + return new TTFTable(); } } diff --git a/fontbox/src/main/java/org/apache/fontbox/ttf/TTFParser.java b/fontbox/src/main/java/org/apache/fontbox/ttf/TTFParser.java index 7d15642ce3c..8170210436a 100644 --- a/fontbox/src/main/java/org/apache/fontbox/ttf/TTFParser.java +++ b/fontbox/src/main/java/org/apache/fontbox/ttf/TTFParser.java @@ -289,7 +289,7 @@ private TTFTable readTableDirectory(TTFDataStream raf) throws IOException table = new GlyphSubstitutionTable(); break; default: - table = readTable(tag); + table = new TTFTable(); break; } table.setTag(tag); @@ -305,10 +305,4 @@ private TTFTable readTableDirectory(TTFDataStream raf) throws IOException return table; } - - protected TTFTable readTable(String tag) - { - // unknown table type but read it anyway. - return new TTFTable(); - } }