Tilman Hausherr created PDFBOX-5744:
---------------------------------------
Summary: EOFException while readMultipleSubstitutionSubtable()
Key: PDFBOX-5744
URL: https://issues.apache.org/jira/browse/PDFBOX-5744
Project: PDFBox
Issue Type: Bug
Components: FontBox
Affects Versions: 3.0.2 PDFBox
Reporter: Tilman Hausherr
Assignee: Tilman Hausherr
Fix For: 3.0.2 PDFBox, 4.0.0
Attachments: NotoSerifMyanmar.ttc
Another found because of PDFBOX-5743.
{code:java}
TrueTypeCollection ttc = new TrueTypeCollection(new
File("NotoSerifMyanmar.ttc"));
ttc.processAllFonts((TrueTypeFont ttf) ->
{
System.out.println(ttf.getName());
});
{code}
{noformat}
java.io.EOFException: EOF
at
org.apache.fontbox.ttf.TTFDataStream.readUnsignedShort(TTFDataStream.java:154)
at
org.apache.fontbox.ttf.TTFDataStream.readUnsignedShortArray(TTFDataStream.java:188)
at
org.apache.fontbox.ttf.GlyphSubstitutionTable.readMultipleSubstitutionSubtable(GlyphSubstitutionTable.java:561)
at
org.apache.fontbox.ttf.GlyphSubstitutionTable.readLookupSubtable(GlyphSubstitutionTable.java:284)
at
org.apache.fontbox.ttf.GlyphSubstitutionTable.readLookupTable(GlyphSubstitutionTable.java:451)
at
org.apache.fontbox.ttf.GlyphSubstitutionTable.readLookupList(GlyphSubstitutionTable.java:268){code}
Assuming that such font files are correct, the investigation showed that the
table is read several times, i.e. the glyphCount variable was used wrongly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]