PDF::API2::Basic::TTF::Name - String table for a TTF font |
PDF::API2::Basic::TTF::Name - String table for a TTF font
Strings are held by number, platform, encoding and language. Strings are accessed as:
$f->{'name'}{'strings'}[$number][$platform_id][$encoding_id]{$language_id}
Notice that the language is held in an associative array due to its sparse nature on some platforms such as Microsoft ($pid = 3). Notice also that the array order is different from the stored array order (platform, encoding, language, number) to allow for easy manipulation of strings by number (which is what I guess most people will want to do).
By default, $PDF::API2::Basic::TTF::Name::utf8
is set to 1, and strings will be stored as UTF8 wherever
possible. The method is_utf8
can be used to find out if a string in a particular
platform and encoding will be returned as UTF8. Unicode strings are always
converted if utf8 is requested. Otherwise, strings are stored according to platform:
***WARNING NON-UTF8 is deprecated and utf8 strings has become the default***
You now have to set <$PDF::API2::Basic::TTF::Name::utf8> to 0 to get the old behaviour.
Reads all the names into memory
Returns whether a string of a given platform and encoding is going to be in UTF8
Martin Hosken Martin_Hosken@sil.org. See the PDF::API2::Basic::TTF::Font manpage for copyright and licensing.
PDF::API2::Basic::TTF::Name - String table for a TTF font |