pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Choosing a font for non-ASCII characters
Date Sun, 03 Mar 2019 13:38:07 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

John,

On 3/2/19 10:16, John Logan wrote:
> Christopher, is the font that you don’t want to embed a Type 1
> font, or a TrueType font?

I'm using PDType0Font.load to load the font, but the file is TT:

ARIALUNI.TTF: TrueType Font data, digitally signed, 20 tables, 1st
"DSIG", name offset 0x161c2f0

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

I have no idea. The information about PDFBox seems to be mostly in
example programs and not web-based documentation. Searching e.g.
Google for "how to use FontBox with PDFBox" generally comes up with
references into the Javadoc for "uses of FontBox interface".

The Javadoc does not describe what FontBox is and none of the classes
or subclasses in those related packages really have any documentation
worth reading. Each class "foo" is described as "being a foo" and each
"getBar" method is described as "gets the bar for the foo".

So... discoverability of features is pretty much nil here.

I'm quite happy with the responses I get on this mailing list, but
it's nearly impossible to discover on my own what is possible, here.
I shouldn't have to get you guys to tell me how to use the software...
you have better things to do (like continue to write great software).

Is there a good example of using FontBox with PDFBox in order to
subset a font?

- -chris

>> 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
> 
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlx72L8ACgkQHPApP6U8
pFieHQ/8CGlWfRwCNzFdZOLIz/bgquqSsVlGMSYwdMv3+Ytl5WJ8vvJj1az/YNVE
yyIXVKWWVa1aQiEMX+wEXZIhcLX1YROireFYkC6IwQaCjlfLtPTPopjwehVTfnN7
M5Fk23Rfge+Eths9alRm82hLgoKnYO70bYWfAWeYXokjPUXcQokfyG7N3CkWYaZa
Ljt8fihDGbk266v7wPwbiRef58F3NW1EfSFV4J8qFr/bOiLZsRXGY2UXe4/k6Fxn
qGSMqnV76CwWWXSYp4saKG0kAija37huAooYhksWAOO12WPJbOtCVD3C6veS/R8M
RFXOb9z9uT/yratN7KGDxuWKT28YXaoFPzJfLwx1ZOiDZCK3E39xG8d7/dqiAFrb
Edc4mBxK0wz9Ew6B1zReOG3d3kP7ksYEUsMwtLltfz4LSj17dzTuWaMCV5EQ0FRx
8oFm7xiPXBNwA8tNj/+US81jGV2u2pwxcKUi8LEygJzp7qjw5RsIQMrXUq450NWE
LKIPqUE3I8iIpCqST1IX6qMSKgUpYyKi9nTxjMXIjNL6j9kA91fzsZLluBRm2vCs
+jAgcVRImSrQ2wa0ZFtTEf3xQpEorkELgN1KhVkVRLllkisVmdqY026z7KfWwwP7
YsKBs6Si/ZOrDQO5gxlzXZIcE8AO54X7vh5V+IfKVsN+n6fwW9E=
=jXC9
-----END PGP SIGNATURE-----

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


Mime
View raw message