1Font::TTF::GSUB(3) User Contributed Perl Documentation Font::TTF::GSUB(3)
2
3
4
6 Font::TTF::GSUB - Module support for the GSUB table in conjunction with
7 TTOpen
8
10 Handles the GSUB subtables in relation to Ttopen tables. Due to the
11 variety of different lookup types, the data structures are not all that
12 straightforward, although I have tried to make life easy for myself
13 when using this!
14
16 The structure of a GSUB table is the same as that given in
17 Font::TTF::Ttopen. Here we give some of the semantics specific to GSUB
18 lookups.
19
20 ACTION_TYPE
21 This is a string taking one of 4 values indicating the nature of
22 the information in the ACTION array of the rule:
23
24 g The action contains a string of glyphs to replace the match
25 string by
26
27 l The action array contains a list of offsets and lookups to
28 run, in order, on the matched string
29
30 a The action array is an unordered set of optional
31 replacements for the matched glyph. The application should
32 make the selection somehow.
33
34 o The action array is empty (in fact there is no rule array
35 for this type of rule) and the ADJUST value should be added
36 to the glyph id to find the replacement glyph id value
37
38 MATCH_TYPE
39 This indicates which type of information the various MATCH arrays
40 (MATCH, PRE, POST) hold in the rule:
41
42 g The array holds a string of glyph ids which should match
43 exactly
44
45 c The array holds a sequence of class definitions which each
46 glyph should correspondingly match to
47
48 o The array holds offsets to coverage tables
49
51 The following table gives the values for ACTION_TYPE and MATCH_TYPE for
52 each of the 11 different lookup types found in the GSUB table
53 definition I have:
54
55 1.1 1.2 2 3 4 5.1 5.2 5.3 6.1 6.2 6.3
56 ACTION_TYPE o g g a g l l l l l l
57 MATCH_TYPE g g c o g c o
58
59 Hopefully, the rest of the uses of the variables should make sense from
60 this table.
61
63 $t->read_sub($fh, $lookup, $index)
64 Asked by the superclass to read in from the given file the indexth
65 subtable from lookup number lookup. The file is positioned ready for
66 the read.
67
68 $t->extension
69 Returns the table type number for the extension table
70
71 $t->out_sub($fh, $lookup, $index)
72 Passed the filehandle to output to, suitably positioned, the lookup and
73 subtable index, this function outputs the subtable to $fh at that
74 point.
75
77 Martin Hosken Martin_Hosken@sil.org. See Font::TTF::Font for copyright
78 and licensing.
79
80
81
82perl v5.16.3 2011-10-13 Font::TTF::GSUB(3)