[
https://issues.apache.org/jira/browse/PDFBOX-5728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17793646#comment-17793646
]
Daniel Gredler commented on PDFBOX-5728:
----------------------------------------
No, unfortunately I don't have access to the font file. My best guess is that
it was a version 3 PostScript table
([https://learn.microsoft.com/en-us/typography/opentype/spec/post#version-30),]
but that's just a guess. In this scenario `PostScriptTable.glyphNames` would
remain `null`, causing `getName()` to return `null`.
> NullPointerException in TTFSubsetter.buildPostTable()
> -----------------------------------------------------
>
> Key: PDFBOX-5728
> URL: https://issues.apache.org/jira/browse/PDFBOX-5728
> Project: PDFBox
> Issue Type: Bug
> Components: FontBox
> Affects Versions: 2.0.28
> Reporter: Daniel Gredler
> Priority: Major
>
> It looks like `TTFSubsetter.buildPostTable()` can sometimes throw NPEs:
> java.lang.NullPointerException: null
> at
> org.apache.fontbox.ttf.TTFSubsetter.buildPostTable(TTFSubsetter.java:859)
> at
> org.apache.fontbox.ttf.TTFSubsetter.writeToStream(TTFSubsetter.java:971)
> Looking at the code, the `names` map keys are Strings that come from
> `PostScriptTable.getName(gid)`, which can sometimes return `null`. A few
> lines later, these possibly-null String keys are converted to bytes, at which
> point the system may throw a NPE.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]