1Font::TTF::GSUB(3)    User Contributed Perl Documentation   Font::TTF::GSUB(3)
2
3
4

NAME

6       Font::TTF::GSUB - Module support for the GSUB table in conjunction with
7       TTOpen
8

DESCRIPTION

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

INSTANCE VARIABLES

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           r       The action array is a list of replacement glyphs in
39                   coverage order. This ACTION_TYPE is used only for Type 8
40                   Reverse Chaining lookups which, by design, are single glyph
41                   substitution.
42
43       MATCH_TYPE
44           This indicates which type of information the various MATCH arrays
45           (MATCH, PRE, POST) hold in the rule:
46
47           g       The array holds a string of glyph ids which should match
48                   exactly
49
50           c       The array holds a sequence of class definitions which each
51                   glyph should correspondingly match to
52
53           o       The array holds offsets to coverage tables
54

CORRESPONDANCE TO LAYOUT TYPES

56       The following table gives the values for ACTION_TYPE and MATCH_TYPE for
57       each of the 12 different lookup types found in the GSUB table
58       definition:
59
60                       1.1 1.2  2  3  4  5.1 5.2 5.3  6.1 6.2 6.3  8
61         ACTION_TYPE    o   g   g  a  g   l   l   l    l   l   l   r
62         MATCH_TYPE                   g   g   c   o    g   c   o   o
63
64       Hopefully, the rest of the uses of the variables should make sense from
65       this table.
66

METHODS

68   $t->read_sub($fh, $lookup, $index)
69       Asked by the superclass to read in from the given file the indexth
70       subtable from lookup number lookup. The file is positioned ready for
71       the read.
72
73   $t->extension
74       Returns the table type number for the extension table
75
76   $t->out_sub($fh, $lookup, $index)
77       Passed the filehandle to output to, suitably positioned, the lookup and
78       subtable index, this function outputs the subtable to $fh at that
79       point.
80

AUTHOR

82       Martin Hosken <http://scripts.sil.org/FontUtils>.
83

LICENSING

85       Copyright (c) 1998-2016, SIL International (http://www.sil.org)
86
87       This module is released under the terms of the Artistic License 2.0.
88       For details, see the full text of the license in the file LICENSE.
89
90
91
92perl v5.28.1                      2016-08-03                Font::TTF::GSUB(3)
Impressum