1Font::TTF::OTTags(3) User Contributed Perl Documentation Font::TTF::OTTags(3)
2
3
4
6 Font::TTF::OTTags - Utilities for TrueType/OpenType tags
7
9 use Font::TTF::OTTags qw( %tttags %ttnames %iso639 readtagsfile );
10
11 # Look at built-in stuff:
12 $script_tag = $tttags{'SCRIPT'}{'Cypriot Syllabary'}; # returns 'cprt'
13 $lang_name = $ttnames{'LANGUAGE'}{'ALT '}; # returns 'Altai'
14
15 # Map iso639 tag to/from OT lang tag
16 @isotags = $iso639{'ALT '}; # returns [ 'atv', 'alt' ]
17 $lang_tag = $iso639{'atv'}; # returns 'ALT '
18
19 # Read latest tags file to add to built-in definitions
20 readtagsfile ("C:\\Program Files\\Microsoft VOLT\\TAGS.txt");
21
22 First-level keys to %tttags and %ttnames are:
23
24 'SCRIPT' -- retrieve script tag or name
25
26 'LANGUAGE' -- retrieve language tag or name
27
28 'FEATURE' -- retrieve feature tag or name
29
30 Built-in data has been derived from Microsofts tag registry at
31 <http://www.microsoft.com/typography/otspec/ttoreg.htm>, updated to
32 draft v1.5 of the OpenType Spec.
33
35 readtagsfile ( filename )
36 Read a file in the syntax of Tags.txt (included with Microsoft VOLT) to
37 obtain additional/replacement tag definitions.
38
39 Returns 0 if cannot open the file; else 1.
40
41
42
43perl v5.16.3 2011-10-13 Font::TTF::OTTags(3)