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 <thaush...@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-unsubscr...@pdfbox.apache.org
> For additional commands, e-mail: users-h...@pdfbox.apache.org
> 



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

Reply via email to