pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Logan <john.lo...@texture.com>
Subject Re: Choosing a font for non-ASCII characters
Date Sat, 02 Mar 2019 15:16:45 GMT
Christopher, is the font that you don’t want to embed a Type 1 font, or a TrueType font?

If the latter, could you use Fontbox to subset the font and keep the file size small?

> On Mar 2, 2019, at 7:00 AM, Tilman Hausherr <THausherr@t-online.de> wrote:
> 
> Am 02.03.2019 um 15:54 schrieb Christopher Schultz:
>> Is there a good way to probe
>> text to determine whether or not an alternate font will be necessary
>> and only load/bundle it then?
> 
> From the new EmbeddedMultipleFonts.java example (in the source code download):
> 
> 
>     boolean isWinAnsiEncoding(int unicode)
>     {
>         String name = GlyphList.getAdobeGlyphList().codePointToName(unicode);
>         if (".notdef".equals(name))
>         {
>             return false;
>         }
>         return WinAnsiEncoding.INSTANCE.contains(name);
>     }
> 
> 
> When that one returns true, you can use the built-in fonts.
> 
> Tilman
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 



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


Mime
View raw message