{
    "content": [
        {
            "type": "text",
            "text": "# Font::TTF::GPOS (perldoc)\n\n## NAME\n\nFont::TTF::GPOS - Support for Opentype GPOS tables in conjunction with TTOpen\n\n## DESCRIPTION\n\nThe GPOS table is one of the most complicated tables in the TTF spec and the corresponding data\nstructure abstraction is also not trivial. While much of the structure of a GPOS is shared with\na GSUB table via the Font::TTF::Ttopen\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **INSTANCE VARIABLES** (1 subsections)\n- **CORRESPONDANCE TO LAYOUT TYPES**\n- **METHODS**\n- **AUTHOR**\n- **LICENSING**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Font::TTF::GPOS",
        "section": "",
        "mode": "perldoc",
        "summary": "Font::TTF::GPOS - Support for Opentype GPOS tables in conjunction with TTOpen",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "INSTANCE VARIABLES",
                "lines": 60,
                "subsections": [
                    {
                        "name": "Value Records",
                        "lines": 41
                    }
                ]
            },
            {
                "name": "CORRESPONDANCE TO LAYOUT TYPES",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSING",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Font::TTF::GPOS - Support for Opentype GPOS tables in conjunction with TTOpen\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The GPOS table is one of the most complicated tables in the TTF spec and the corresponding data\nstructure abstraction is also not trivial. While much of the structure of a GPOS is shared with\na GSUB table via the Font::TTF::Ttopen\n",
                "subsections": []
            },
            "INSTANCE VARIABLES": {
                "content": "Here we describe the additions and lookup specific information for GPOS tables. Unfortunately\nthere is no one abstraction which seems to work comfortable for all GPOS tables, so we will also\nexamine how the variables are used for different lookup types.\n\nThe following are the values allowed in the ACTIONTYPE and MATCHTYPE variables:\n\nACTIONTYPE\nThis can take any of the following values\n\na       The ACTION is an array of anchor tables\n\no       Offset. There is no RULE array. The ADJUST variable contains a value record (see\nlater in this description)\n\nv       The ACTION is a value record.\n\np       Pair adjustment. The ACTION contains an array of two value records for the matched\ntwo glyphs.\n\ne       Exit and Entry records. The ACTION contains an array of two anchors corresponding to\nthe exit and entry anchors for the glyph.\n\nl       Indicates a lookup based contextual rule as per the GSUB table.\n\nMATCHTYPE\nThis can take any of the following values\n\ng       A glyph array\n\nc       An array of class values\n\no       An array of coverage tables\n\nThe following variables are added for Attachment Positioning Subtables:\n\nMATCH\nThis contains an array of glyphs to match against for all RULES. It is much like having the\nsame MATCH string in all RULES. In the cases it is used so far, it only ever contains one\nelement.\n\nMARKS\nThis contains a Mark array consisting of each element being a subarray of two elements:\n\nCLASS   The class that this mark uses on its base\n\nANCHOR  The anchor with which to attach this mark glyph\n\nThe base table for mark to base, ligature or mark attachment positioning is structured with\nthe ACTION containing an array of anchors corresponding to each attachment class. For\nligatures, there is more than one RULE in the RULE array corresponding to each glyph in the\ncoverage table.\n\nOther variables which are provided for informational purposes are:\n\nVFMT\nValue format for the adjustment of the glyph matched by the coverage table.\n\nVFMT2\nValue format used in pair adjustment for the second glyph in the pair\n",
                "subsections": [
                    {
                        "name": "Value Records",
                        "content": "There is a subtype used in GPOS tables called a value record. It is used to adjust the position\nof a glyph from its default position. The value record is variable length with a bitfield at the\nbeginning to indicate which of the following entries are included. The bitfield is not stored\nsince it is recalculated at write time.\n\nXPlacement\nHorizontal adjustment for placement (not affecting other unattached glyphs)\n\nYPlacement\nVertical adjustment for placement (not affecting other unattached glyphs)\n\nXAdvance\nAdjust the advance width glyph (used only in horizontal writing systems)\n\nYAdvance\nAdjust the vertical advance (used only in vertical writing systems)\n\nXPlaDevice\nDevice table for device specific adjustment of horizontal placement\n\nYPlaDevice\nDevice table for device specific adjustment of vertical placement\n\nXAdvDevice\nDevice table for device specific adjustment of horizontal advance\n\nYAdDevice\nDevice table for device specific adjustment of vertical advance\n\nXIdPlacement\nHorizontal placement metric id (for Multiple Master fonts - but that is all I know!)\n\nYIdPlacement\nVertical placement metric id\n\nXIdAdvance\nHorizontal advance metric id\n\nYIdAdvance\nVertical advance metric id\n"
                    }
                ]
            },
            "CORRESPONDANCE TO LAYOUT TYPES": {
                "content": "Here is what is stored in the ACTIONTYPE and MATCHTYPE for each of the known GPOS subtable\ntypes:\n\n1.1 1.2 2.1 2.2 3   4   5   6   7.1 7.2 7.3 8.1 8.2 8.3\nACTIONTYPE    o   v   p   p  e   a   a   a    l   l   l   l   l   l\nMATCHTYPE             g   c                   g   c   o   g   c   o\n",
                "subsections": []
            },
            "METHODS": {
                "content": "readsub\nReads the subtable into the data structures\n\n$t->extension\nReturns the table type number for the extension table\n\n$t->outsub\nOutputs the subtable to the given filehandle\n\n$t->readvalue($format, $base, $lookup, $fh)\nReads a value record from the current location in the file, according to the format given.\n\n$t->readdelta($offset, $base, $lookup, $fh)\nReads a delta (device table) at the given offset if it hasn not already been read. Store the\noffset and item in the lookup cache ($lookup->{' CACHE'})\n\n$t->readanchor($offset, $base, $lookup, $fh)\nReads an Anchor table at the given offset if it has not already been read.\n\n$t->fmtvalue\nReturns the value format for a given value record\n\n$t->outvalue\nReturns the output string for the outputting of the value for a given format. Also updates the\noffset cache for any device tables referenced.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Martin Hosken <http://scripts.sil.org/FontUtils>.\n",
                "subsections": []
            },
            "LICENSING": {
                "content": "Copyright (c) 1998-2016, SIL International (http://www.sil.org)\n\nThis module is released under the terms of the Artistic License 2.0. For details, see the full\ntext of the license in the file LICENSE.\n",
                "subsections": []
            }
        }
    }
}