You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Fernando Arellano (Jira)" <ji...@apache.org> on 2019/10/22 19:35:00 UTC

[jira] [Created] (PDFBOX-4673) Unsupported unicode by font should be displayed as �

Fernando Arellano created PDFBOX-4673:
-----------------------------------------

             Summary: Unsupported unicode by font should be displayed as �
                 Key: PDFBOX-4673
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4673
             Project: PDFBox
          Issue Type: Improvement
            Reporter: Fernando Arellano


When loading a custom font via 
{code:java}
PDType0Font.load(document,this.getClass().getResourceAsStream("/fonts/HelveticaNeueLTW01-75Bold.ttf"));
{code}
 

and trying to render a unicode that is not included in the font PDCIDFontType2.java throws 

throw new IllegalArgumentException(
 String.format("No glyph for U+%04X in font %s", unicode, getName()));. 

Invalidating the whole PDF. 

I believe a better implementation would be just print the *replacement character* �



--
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