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

NAME

6       Font::TTF::Loca - the Locations table, which is intimately tied to the
7       glyf table
8

DESCRIPTION

10       The location table holds the directory of locations of each glyph
11       within the glyf table. Due to this relationship and the unimportance of
12       the actual locations when it comes to holding glyphs in memory, reading
13       the location table results in the creation of glyph objects for each
14       glyph and stores them here.  So if you are looking for glyphs, do not
15       look in the "glyf" table, look here instead.
16
17       Things get complicated if you try to change the glyph list within the
18       one table.  The recommendation is to create another clean location
19       object to replace this table in the font, ensuring that the old table
20       is read first and to transfer or copy glyphs across from the read table
21       to the new table.
22

INSTANCE VARIABLES

24       The instance variables do not start with a space
25
26       glyphs
27           An array of glyph objects for each glyph.
28
29       glyphtype
30           A string containing the class name to create for each new glyph. If
31           empty, defaults to Font::TTF::Glyph.
32

METHODS

34   $t->new
35       Creates a new location table making sure it has a glyphs array
36
37   $t->read
38       Reads the location table creating glyph objects (Font::TTF::Glyph) for
39       each glyph allowing their later reading.
40
41   $t->out($fh)
42       Writes the location table out to $fh. Notice that not having read the
43       location table implies that the glyf table has not been read either, so
44       the numbers in the location table are still valid. Let's hope that
45       "maxp/numGlyphs" and "head/indexToLocFmt" haven't changed otherwise we
46       are in big trouble.
47
48       The function uses the OUTLOC location in the glyph calculated when the
49       glyf table was attempted to be output.
50
51   $t->out_xml($context, $depth)
52       No need to output a loca table, this is dynamically generated
53
54   $t->glyphs_do(&func)
55       Calls func for each glyph in this location table in numerical order:
56
57           &func($glyph, $glyph_num)
58

BUGS

60       None known
61

AUTHOR

63       Martin Hosken <http://scripts.sil.org/FontUtils>.
64

LICENSING

66       Copyright (c) 1998-2016, SIL International (http://www.sil.org)
67
68       This module is released under the terms of the Artistic License 2.0.
69       For details, see the full text of the license in the file LICENSE.
70
71
72
73perl v5.30.0                      2019-07-26                Font::TTF::Loca(3)
Impressum