{
    "mode": "perldoc",
    "parameter": "Font::TTF::Loca",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Font%3A%3ATTF%3A%3ALoca/json",
    "generated": "2026-06-14T05:40:37Z",
    "sections": {
        "NAME": {
            "content": "Font::TTF::Loca - the Locations table, which is intimately tied to the glyf table\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The location table holds the directory of locations of each glyph within the glyf table. Due to\nthis relationship and the unimportance of the actual locations when it comes to holding glyphs\nin memory, reading the location table results in the creation of glyph objects for each glyph\nand stores them here. So if you are looking for glyphs, do not look in the \"glyf\" table, look\nhere instead.\n\nThings get complicated if you try to change the glyph list within the one table. The\nrecommendation is to create another clean location object to replace this table in the font,\nensuring that the old table is read first and to transfer or copy glyphs across from the read\ntable to the new table.\n",
            "subsections": []
        },
        "INSTANCE VARIABLES": {
            "content": "The instance variables do not start with a space\n\nglyphs\nAn array of glyph objects for each glyph.\n\nglyphtype\nA string containing the class name to create for each new glyph. If empty, defaults to\nFont::TTF::Glyph.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "$t->new\nCreates a new location table making sure it has a glyphs array\n\n$t->read\nReads the location table creating glyph objects (Font::TTF::Glyph) for each glyph allowing their\nlater reading.\n\n$t->out($fh)\nWrites the location table out to $fh. Notice that not having read the location table implies\nthat the glyf table has not been read either, so the numbers in the location table are still\nvalid. Let's hope that \"maxp/numGlyphs\" and \"head/indexToLocFmt\" haven't changed otherwise we\nare in big trouble.\n\nThe function uses the OUTLOC location in the glyph calculated when the glyf table was attempted\nto be output.\n\n$t->outxml($context, $depth)\nNo need to output a loca table, this is dynamically generated\n\n$t->glyphsdo(&func)\nCalls func for each glyph in this location table in numerical order:\n\n&func($glyph, $glyphnum)\n",
            "subsections": []
        },
        "BUGS": {
            "content": "None known\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::Loca - the Locations table, which is intimately tied to the glyf table",
    "flags": [],
    "examples": [],
    "see_also": []
}