NAME
Font::TTF::Name - String table for a TTF font
DESCRIPTION
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).
Strings are stored according to platform:
- Unicode (platform id = 0)
-
Currently stored as 16-bit network ordered UCS2. Upon release of Perl 5.005 this will change to utf8 assuming current UCS2 semantics for all encoding ids.
- Mac (platform id = 1)
-
Data is stored as 8-bit binary data, leaving the interpretation to the user according to encoding id.
- Windows (platform id = 3)
-
As per Unicode, the data is currently stored as 16-bit network ordered UCS2. Upon release of Perl 5.005 this will change to utf8 assuming current UCS2 semantics for all encoding ids.
INSTANCE VARIABLES
- strings
-
An array of arrays, etc.
METHODS
$t->read
Reads all the names into memory
$t->out($fh)
Writes out all the strings
BUGS
Unicode type strings will be stored in utf8 for all known platforms, once Perl 5.005 has been released.
AUTHOR
Martin Hosken Martin_Hosken@sil.org. See Font::TTF::Font for copyright and licensing.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 149:
'=item' outside of any '=over'
- Around line 154:
You forgot a '=back' before '=head1'