[ https://issues.apache.org/jira/browse/PDFBOX-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17944444#comment-17944444 ]
Tilman Hausherr commented on PDFBOX-5987: ----------------------------------------- The first strategy didn't work because addAlternatingCurve and addCurve do a switch between two numbers that may not be known at the time of calling. I tried a different solution, preproccessing the sequence to replace all "DIV" operations with their results and that worked immediately. However this is not a general solution. The best would probably be to get rid of the converter and do a full implementation of the type 2 charstring renderer. (Which would produce a lot of double code and possibly be useless if no font in the wild would use the extra features) > Can't render some Type1 fonts. > ------------------------------ > > Key: PDFBOX-5987 > URL: https://issues.apache.org/jira/browse/PDFBOX-5987 > Project: PDFBox > Issue Type: Bug > Components: Rendering > Affects Versions: 3.0.4 PDFBox > Reporter: Daniel Persson > Priority: Minor > Attachments: PDFBOX-5987.cff, PDFBOX-5987_reduced.pdf, > font-issue.pdf, screenshot-1.png > > > This PDF seems to have a font rendering issue in PDFBox. > > I've used both Poppler and Chrome to view the PDF, and it renders correctly. > Stepping through the code on the first character, I see that we have a > rendering list with commands that end in > -40 41 DIV -41 21 DIV CLOSEPATH ENDCHAR > > This is not correct if you look at the byte sequence that ends in > 12 98 -89 12 12 -117 8 14 > > Could be interpreted as > -127 -41 28 -127 -127 0 RRCURVETO ENDCHAR > > So perhaps there is an off-by-one error somewhere or something? -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org