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, don't
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 Martin_Hosken@sil.org. See Font::TTF::Font for copyright
64       and licensing.
65
66
67
68perl v5.12.0                      2008-06-11                Font::TTF::Loca(3)
Impressum