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

NAME

6       Font::TTF::GPOS - Support for Opentype GPOS tables in conjunction with
7       TTOpen
8

DESCRIPTION

10       The GPOS table is one of the most complicated tables in the TTF spec
11       and the corresponding data structure abstraction is also not trivial.
12       While much of the structure of a GPOS is shared with a GSUB table via
13       the Font::TTF::Ttopen
14

INSTANCE VARIABLES

16       Here we describe the additions and lookup specific information for GPOS
17       tables.  Unfortunately there is no one abstraction which seems to work
18       comfortable for all GPOS tables, so we will also examine how the
19       variables are used for different lookup types.
20
21       The following are the values allowed in the ACTION_TYPE and MATCH_TYPE
22       variables:
23
24       ACTION_TYPE
25           This can take any of the following values
26
27           a       The ACTION is an array of anchor tables
28
29           o       Offset. There is no RULE array. The ADJUST variable
30                   contains a value record (see later in this description)
31
32           v       The ACTION is a value record.
33
34           p       Pair adjustment. The ACTION contains an array of two value
35                   records for the matched two glyphs.
36
37           e       Exit and Entry records. The ACTION contains an array of two
38                   anchors corresponding to the exit and entry anchors for the
39                   glyph.
40
41           l       Indicates a lookup based contextual rule as per the GSUB
42                   table.
43
44       MATCH_TYPE
45           This can take any of the following values
46
47           g       A glyph array
48
49           c       An array of class values
50
51           o       An array of coverage tables
52
53       The following variables are added for Attachment Positioning Subtables:
54
55       MATCH
56           This contains an array of glyphs to match against for all RULES. It
57           is much like having the same MATCH string in all RULES. In the
58           cases it is used so far, it only ever contains one element.
59
60       MARKS
61           This contains a Mark array consisting of each element being a
62           subarray of two elements:
63
64           CLASS   The class that this mark uses on its base
65
66           ANCHOR  The anchor with which to attach this mark glyph
67
68           The base table for mark to base, ligature or mark attachment
69           positioning is structured with the ACTION containing an array of
70           anchors corresponding to each attachment class. For ligatures,
71           there is more than one RULE in the RULE array corresponding to each
72           glyph in the coverage table.
73
74       Other variables which are provided for informational purposes are:
75
76       VFMT
77           Value format for the adjustment of the glyph matched by the
78           coverage table.
79
80       VFMT2
81           Value format used in pair adjustment for the second glyph in the
82           pair
83
84   Value Records
85       There is a subtype used in GPOS tables called a value record. It is
86       used to adjust the position of a glyph from its default position. The
87       value record is variable length with a bitfield at the beginning to
88       indicate which of the following entries are included. The bitfield is
89       not stored since it is recalculated at write time.
90
91       XPlacement
92           Horizontal adjustment for placement (not affecting other unattached
93           glyphs)
94
95       YPlacement
96           Vertical adjustment for placement (not affecting other unattached
97           glyphs)
98
99       XAdvance
100           Adjust the advance width glyph (used only in horizontal writing
101           systems)
102
103       YAdvance
104           Adjust the vertical advance (used only in vertical writing systems)
105
106       XPlaDevice
107           Device table for device specific adjustment of horizontal placement
108
109       YPlaDevice
110           Device table for device specific adjustment of vertical placement
111
112       XAdvDevice
113           Device table for device specific adjustment of horizontal advance
114
115       YAdDevice
116           Device table for device specific adjustment of vertical advance
117
118       XIdPlacement
119           Horizontal placement metric id (for Multiple Master fonts - but
120           that is all I know!)
121
122       YIdPlacement
123           Vertical placement metric id
124
125       XIdAdvance
126           Horizontal advance metric id
127
128       YIdAdvance
129           Vertical advance metric id
130

CORRESPONDANCE TO LAYOUT TYPES

132       Here is what is stored in the ACTION_TYPE and MATCH_TYPE for each of
133       the known GPOS subtable types:
134
135                       1.1 1.2 2.1 2.2 3   4   5   6   7.1 7.2 7.3 8.1 8.2 8.3
136         ACTION_TYPE    o   v   p   p  e   a   a   a    l   l   l   l   l   l
137         MATCH_TYPE             g   c                   g   c   o   g   c   o
138

METHODS

140   read_sub
141       Reads the subtable into the data structures
142
143   $t->extension
144       Returns the table type number for the extension table
145
146   $t->out_sub
147       Outputs the subtable to the given filehandle
148
149   $t->read_value($format, $base, $lookup, $fh)
150       Reads a value record from the current location in the file, according
151       to the format given.
152
153   $t->read_delta($offset, $base, $lookup, $fh)
154       Reads a delta (device table) at the given offset if it hasn not already
155       been read.  Store the offset and item in the lookup cache ($lookup->{'
156       CACHE'})
157
158   $t->read_anchor($offset, $base, $lookup, $fh)
159       Reads an Anchor table at the given offset if it has not already been
160       read.
161
162   $t->fmt_value
163       Returns the value format for a given value record
164
165   $t->out_value
166       Returns the output string for the outputting of the value for a given
167       format. Also updates the offset cache for any device tables referenced.
168

AUTHOR

170       Martin Hosken <http://scripts.sil.org/FontUtils>.
171

LICENSING

173       Copyright (c) 1998-2016, SIL International (http://www.sil.org)
174
175       This module is released under the terms of the Artistic License 2.0.
176       For details, see the full text of the license in the file LICENSE.
177
178
179
180perl v5.32.0                      2020-07-28                Font::TTF::GPOS(3)
Impressum