Skip to content

Commit 515fb2c

Browse files
committed
PDFBOX-5660: optimize, as suggested by Axel Howind / Valery Bokov; closes #270
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1928938 13f79535-47bb-0310-9956-ffa450edef68
1 parent 9d2a14f commit 515fb2c

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/TrueTypeEmbedder.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.io.IOException;
2424
import java.io.InputStream;
2525
import java.nio.charset.StandardCharsets;
26-
import java.util.ArrayList;
2726
import java.util.HashSet;
2827
import java.util.List;
2928
import java.util.Map;
@@ -313,18 +312,9 @@ public void subset() throws IOException
313312
}
314313

315314
// PDF spec required tables (if present), all others will be removed
316-
List<String> tables = new ArrayList<>();
317-
tables.add("head");
318-
tables.add("hhea");
319-
tables.add("loca");
320-
tables.add("maxp");
321-
tables.add("cvt ");
322-
tables.add("prep");
323-
tables.add("glyf");
324-
tables.add("hmtx");
325-
tables.add("fpgm");
315+
List<String> tables = List.of("head", "hhea","loca","maxp","cvt ","prep","glyf","hmtx","fpgm",
326316
// Windows ClearType
327-
tables.add("gasp");
317+
"gasp");
328318

329319
// set the GIDs to subset
330320
TTFSubsetter subsetter = new TTFSubsetter(ttf, tables);

0 commit comments

Comments
 (0)