[ 
https://issues.apache.org/jira/browse/PDFBOX-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fernando Arellano updated PDFBOX-4673:
--------------------------------------
    Description: 
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, the 
PDCIDFontType2.java class throws 
{code:java}
throw new IllegalArgumentException(String.format("No glyph for U+%04X in font 
%s", unicode, getName()));. 
{code}
 in line 365.

Invalidating the whole PDF. 

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

[https://en.wikipedia.org/wiki/Specials_(Unicode_block)]

 

  was:
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 
{code:java}
throw new IllegalArgumentException(String.format("No glyph for U+%04X in font 
%s", unicode, getName()));. 
{code}
 

Invalidating the whole PDF. 

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

[https://en.wikipedia.org/wiki/Specials_(Unicode_block)]

 


> 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
>            Priority: Major
>
> 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, the 
> PDCIDFontType2.java class throws 
> {code:java}
> throw new IllegalArgumentException(String.format("No glyph for U+%04X in font 
> %s", unicode, getName()));. 
> {code}
>  in line 365.
> Invalidating the whole PDF. 
> I believe a better implementation would be just print the *replacement 
> character* � 
> [https://en.wikipedia.org/wiki/Specials_(Unicode_block)]
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to