{
    "mode": "perldoc",
    "parameter": "Font::TTF::Kern",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Font%3A%3ATTF%3A%3AKern/json",
    "generated": "2026-07-05T09:29:14Z",
    "sections": {
        "NAME": {
            "content": "Font::TTF::Kern - Kerning tables\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Kerning tables are held as an ordered collection of subtables each giving incremental\ninformation regarding the kerning of various pairs of glyphs.\n\nThe basic structure of the kerning data structure is:\n\n$kern = $f->{'kern'}{'tables'}[$tnum]{'kerns'}{$leftnum}{$rightnum};\n\nDue to the possible complexity of some kerning tables the above information is insufficient.\nReference also needs to be made to the type of the table and the coverage field.\n",
            "subsections": []
        },
        "INSTANCE VARIABLES": {
            "content": "The instance variables for a kerning table are relatively straightforward.\n\nVersion\nVersion number of the kerning table\n\nNum Number of subtables in the kerning table\n\ntables\nArray of subtables in the kerning table\n\nEach subtable has a number of instance variables.\n\nkern\nA two level hash array containing kerning values. The indexing is left is via left class\nand right class. It may seem using hashes is strange, but most tables are not type 2 and\nthis method saves empty array values.\n\ntype\nStores the table type. Only type 0 and type 2 tables are specified for TrueType so far.\n\ncoverage\nA bit field of coverage information regarding the kerning value. See the TrueType\nspecification for details.\n\nVersion\nContains the version number of the table.\n\nNum Number of kerning pairs in this type 0 table.\n\nleft\nAn array indexed by glyph - leftfirst which returns a class number for the glyph in\ntype 2 tables.\n\nright\nAn array indexed by glyph - rightfirst which returns a class number for the glyph in\ntype 2 tables.\n\nleftfirst\nthe glyph number of the first element in the left array for type 2 tables.\n\nrightfirst\nthe glyph number of the first element in the right array for type 2 tables.\n\nnumleft\nNumber of left classes\n\nnumright\nNumber of right classes\n",
            "subsections": []
        },
        "METHODS": {
            "content": "$t->read\nReads the whole kerning table into structures\n\n$t->out($fh)\nOutputs the kerning tables to the given file\n\n$t->XMLelement($context, $depth, $key, $value)\nHandles outputting the kern hash into XML a little more tidily\n\n$t->minsize()\nReturns the minimum size this table can be. If it is smaller than this, then the table must be\nbad and should be deleted or whatever.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "*   Only supports kerning table types 0 & 2.\n\n*   No real support functions to *do* anything with the kerning tables yet.\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": []
        }
    },
    "summary": "Font::TTF::Kern - Kerning tables",
    "flags": [],
    "examples": [],
    "see_also": []
}