pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (Jira)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4667) Issue in FontMapperImpl#isCharSetMatch when font codePageRange is -1
Date Tue, 15 Oct 2019 16:21:00 GMT

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

Tilman Hausherr commented on PDFBOX-4667:
-----------------------------------------

Have a look at the TestPDFToImage.java unit test. This is disabled because the renderings
are different depending on OS / jdk / installed fonts. The class javadoc has more explanation.
Add your own files into the source directory, start, the test will fail but you'll have PNG
files in the destination directory. Copy these into the source directory, the test will succeed.
Until you make some change, then the test will fail and you should look at the diff files
in the destination directory.

> Issue in FontMapperImpl#isCharSetMatch when font codePageRange is -1
> --------------------------------------------------------------------
>
>                 Key: PDFBOX-4667
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4667
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.16
>            Reporter: Struve Pierre
>            Assignee: Tilman Hausherr
>            Priority: Trivial
>             Fix For: 2.0.18, 3.0.0 PDFBox
>
>         Attachments: OcrB Regular.ttf, screenshot-1.png
>
>
> Hi I met an issue with a font.
> It seems to me that code page range has not been set and then in org.apache.pdfbox.pdmodel.font.FontMapperImpl#isCharSetMatch
-1 is used.
> It seems to me that -1 means "open bar".
> I was trying to find a font that matches CHINESE_SIMPLIFIED (cidSystemInfo.getOrdering{color:#9876aa}(){color}.equals{color:#9876aa}({color}{color:#6a8759}"GB1"{color}{color:#9876aa}){color}),
and due to the -1 this font was matched and unluckily it was the one picked.
> Do you think we can make a special case for -1 (return false)?
> Is there any font currently that matches all code page ranges?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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


Mime
View raw message