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

John Hewson commented on PDFBOX-2557:
-------------------------------------

The built-in mappings are for Standard 14 fonts only. Any other substitution 
needs to be done by our generic mechanisms, rather than being hardcoded.

Bold fonts don't have a flag in the FontDescriptor, so we use the following 
heuristic in getFallbackFontName() to detect them:
{code}
isBold = fontDescriptor.getFontName().toLowerCase().contains("bold");
{code}

We could change this to:

{code}
String name = fontDescriptor.getFontName().toLowerCase();
isBold = name.contains("bold") || name.endWith("black") 
{code}


> Yellow text not using heavy font
> --------------------------------
>
>                 Key: PDFBOX-2557
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2557
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.0
>            Reporter: simon steiner
>
> http://acroeng.adobe.com/Test_Files/images/jpeg2000//SF-TripleBonus_02.pdf
> java -cp 
> pdf-box-svn/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar:lib/jai_imageio.jar 
> org.apache.pdfbox.tools.PDFToImage SF-TripleBonus_02.pdf



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to