Font::TTF::GPOS(3pm) | User Contributed Perl Documentation | Font::TTF::GPOS(3pm) |
Font::TTF::GPOS - Support for Opentype GPOS tables in conjunction with TTOpen
The GPOS table is one of the most complicated tables in the TTF spec and the corresponding data structure abstraction is also not trivial. While much of the structure of a GPOS is shared with a GSUB table via the Font::TTF::Ttopen
Here we describe the additions and lookup specific information for GPOS tables. Unfortunately there is no one abstraction which seems to work comfortable for all GPOS tables, so we will also examine how the variables are used for different lookup types.
The following are the values allowed in the ACTION_TYPE and MATCH_TYPE variables:
The following variables are added for Attachment Positioning Subtables:
The base table for mark to base, ligature or mark attachment positioning is structured with the ACTION containing an array of anchors corresponding to each attachment class. For ligatures, there is more than one RULE in the RULE array corresponding to each glyph in the coverage table.
Other variables which are provided for informational purposes are:
There is a subtype used in GPOS tables called a value record. It is used to adjust the position of a glyph from its default position. The value record is variable length with a bitfield at the beginning to indicate which of the following entries are included. The bitfield is not stored since it is recalculated at write time.
Here is what is stored in the ACTION_TYPE and MATCH_TYPE for each of the known GPOS subtable types:
1.1 1.2 2.1 2.2 3 4 5 6 7.1 7.2 7.3 8.1 8.2 8.3 ACTION_TYPE o v p p e a a a l l l l l l MATCH_TYPE g c g c o g c o
Reads the subtable into the data structures
Returns the table type number for the extension table
Outputs the subtable to the given filehandle
Reads a value record from the current location in the file, according to the format given.
Reads a delta (device table) at the given offset if it hasn not already been read. Store the offset and item in the lookup cache ($lookup->{' CACHE'})
Reads an Anchor table at the given offset if it has not already been read.
Returns the value format for a given value record
Returns the output string for the outputting of the value for a given format. Also updates the offset cache for any device tables referenced.
Martin Hosken <http://scripts.sil.org/FontUtils>.
Copyright (c) 1998-2016, SIL International (http://www.sil.org)
This module is released under the terms of the Artistic License 2.0. For details, see the full text of the license in the file LICENSE.
2020-12-27 | perl v5.32.0 |