[ 
https://issues.apache.org/jira/browse/PDFBOX-5785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17826961#comment-17826961
 ] 

Andreas Lehmkühler commented on PDFBOX-5785:
--------------------------------------------

Looks like 2.0.2 isn't able to read the font in question so that it is replaced 
with another one
{code}
WARNUNG: Could not read embedded TTF for font 
ACPDEB+FrutigerNeueLTProBook-Identity-H
java.io.IOException: loca is mandatory
        at org.apache.fontbox.ttf.TTFParser.parseTables(TTFParser.java:206)
        at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:150)
        at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:106)
        at 
org.apache.pdfbox.pdmodel.font.PDCIDFontType2.<init>(PDCIDFontType2.java:111)
        at 
org.apache.pdfbox.pdmodel.font.PDCIDFontType2.<init>(PDCIDFontType2.java:70)
        at 
org.apache.pdfbox.pdmodel.font.PDFontFactory.createDescendantFont(PDFontFactory.java:125)
        at 
org.apache.pdfbox.pdmodel.font.PDType0Font.<init>(PDType0Font.java:128)
        at 
org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:83)
        at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:123)
        at 
org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
        at 
org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
        at 
org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
        at 
org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446)
        at 
org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)
        at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:189)
        at 
org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:208)
        at 
org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:139)
        at 
org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:68)
        at 
org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:156)
        at 
org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:139)
        at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)

März 14, 2024 7:47:30 AM org.apache.pdfbox.pdmodel.font.PDCIDFontType2 <init>
WARNUNG: Using fallback font LiberationSans for CID-keyed TrueType font 
ACPDEB+FrutigerNeueLTProBook-Identity-H
{code}

> Issue with embedded Font and descendant Font
> --------------------------------------------
>
>                 Key: PDFBOX-5785
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5785
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.30, 3.0.1 PDFBox
>            Reporter: Oliver Schmidtmer
>            Priority: Major
>              Labels: regression
>         Attachments: Renfer_Beleg_ueber_SFr_1000.pdf, 
> image-2024-03-13-18-01-57-168.png, image-2024-03-13-18-04-49-957.png, 
> image-2024-03-13-21-06-01-596.png
>
>
> On the attached PDF, a text where the second font is used cannot be rendered:
> !image-2024-03-13-18-01-57-168.png|width=547,height=60!
> From debugging I can see, that PDType0Font.codeToGID(code) does return "0" 
> for this chars.
> The call there is delegated to descendantFont.codeToGID(code).
> However at least for code to unicode, the map is in the font itself, not the 
> descendant:
> !image-2024-03-13-18-04-49-957.png|width=500,height=213! 
> The font view in the PDF Debugger also shows codes from 1 to 7, instead of 
> those from the unicode map.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to