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

simon steiner commented on PDFBOX-1701:
---------------------------------------

You can use system font as fallback:

+            LOG.warn("Changing font on <" + string + "> from <"
+                    + _awtFont.getName() + "> to the default font");
+            
+            Font base = 
FontManager.getAwtFont(font.getNameAsString(COSName.BASE_FONT));
+            if (base == null) {
+                _awtFont = Font.decode(null).deriveFont(1f);
+            } else {
+                _awtFont = base;
+                awtFont = base;
+            } 
                
> Suggestion: better font than the standard font
> ----------------------------------------------
>
>                 Key: PDFBOX-1701
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1701
>             Project: PDFBox
>          Issue Type: Improvement
>    Affects Versions: 2.0.0
>         Environment: W7
>            Reporter: Tilman Hausherr
>            Priority: Minor
>         Attachments: Bimbo_Historia_20070409_Esp-01-bad.png, 
> Bimbo_Historia_20070409_Esp-01-good.png, PDFBOX-1701.patch
>
>
> pdfbox\pdfviewer\PageDrawer.java has "Fallback: we can't find anything, so we 
> have to use the standard font" code. However the standard font is a sans 
> serif font. My suggestion is to use several standard fonts, i.e. for 
> monospace, serif, sans serif, symbol, capitals, etc.
> I tried it (see patch) on page 1 of the "Bimbo" pdf of PDFBOX-1694, and the 
> result looks better than without the change. (There are still other problems 
> with the next pages, I believe that there is a different cause, maybe similar 
> to the "Elvia" file of PDFBOX-1689).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to