You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2023/05/27 12:18:00 UTC

[jira] [Created] (PDFBOX-5612) PDF with mangled font rendering in some environments

Tilman Hausherr created PDFBOX-5612:
---------------------------------------

             Summary: 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: 3.0.1 JBIG2, 2.0.28
            Reporter: Tilman Hausherr


As reported 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 could simulate what the user mentioned by making it appear that Calibri is missing by altering 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) 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org