[
https://issues.apache.org/jira/browse/PDFBOX-5728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17793819#comment-17793819
]
Tilman Hausherr edited comment on PDFBOX-5728 at 12/12/23 10:06 AM:
--------------------------------------------------------------------
I can't get that file of yours. I tried a file from the internet but it works
fine. I can reproduce the effect with the Arial font from Windows 10 but that
one didn't throw an NPE with a real world example, so your font is different
somewhere. Please try with the latest snapshot
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.31-SNAPSHOT/
and tell whether it works now. If not please attach the Noto font.
was (Author: tilman):
I can't get that file of yours. A tried a file from the internet but it works
fine. I can reproduce the effect with the Arial font from Windows 10 but that
one didn't throw an NPE with a real world example, so your font is different
somewhere. Please try with the latest snapshot
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.31-SNAPSHOT/
and tell whether it works now. If not please attach the Noto font.
> 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, 3.0.1 PDFBox
> Reporter: Daniel Gredler
> Priority: Major
> Fix For: 2.0.31, 3.0.2 PDFBox, 4.0.0
>
> Attachments: NotoMono-Regular.ttf
>
>
> 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]