[
https://issues.apache.org/jira/browse/PDFBOX-5612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17726888#comment-17726888
]
ASF subversion and git services commented on PDFBOX-5612:
---------------------------------------------------------
Commit 1910095 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1910095 ]
PDFBOX-5612: avoid NPE
> PDF with mangled font rendering in some environments
> ----------------------------------------------------
>
> Key: PDFBOX-5612
> URL: https://issues.apache.org/jira/browse/PDFBOX-5612
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.28, 3.0.0 PDFBox
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Priority: Major
> Fix For: 2.0.29, 3.0.0 PDFBox
>
> Attachments: PP90092026_PL0029_490.pdf
>
>
> As
> [reported|https://lists.apache.org/thread/k25mo4wlnhm4lkcxt0d42lqwxo6w0cvn]
> by Daniel Skiles:
> On Windows systems, this works fine, but on Linux systems, PDFBox renders
> the text as gibberish glyphs in a way that I've never seen before.
> When I reproduce the issue with logging increased to trace, I get the
> following line in the log.
> 15:55:15.622 [main] WARN org.apache.pdfbox.pdmodel.font.PDCIDFontType2 -
> Using non-embedded GIDs in font Calibri
> ====
> What I think is happening is that PDCIDFontType2.codeToGID() chooses the
> "Using non-embedded GIDs in font" branch erroneously. This should be chosen
> only if the fonts are identical, i.e. if a missing/broken font is replaced by
> the SAME one from disk.
> I also tried to change the code so that it avoids the "Using non-embedded
> GIDs in font" segment and that worked.
> I could simulate what the user mentioned by making it appear that Calibri is
> missing by altering the {{for (URI font : fonts)}} segment in
> {{FileSystemFontProvider}} so that it omits the Calibri font. (In the users
> application, the Carlito font is used instead, I wasn't able to reproduce
> that; for me it used Liberation and then showed gibberish)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]