.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Font::TTF::Loca 3" .TH Font::TTF::Loca 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Font::TTF::Loca \- the Locations table, which is intimately tied to the glyf table .SH DESCRIPTION .IX Header "DESCRIPTION" The location table holds the directory of locations of each glyph within the glyf table. Due to this relationship and the unimportance of the actual locations when it comes to holding glyphs in memory, reading the location table results in the creation of glyph objects for each glyph and stores them here. So if you are looking for glyphs, do not look in the \f(CW\*(C`glyf\*(C'\fR table, look here instead. .PP Things get complicated if you try to change the glyph list within the one table. The recommendation is to create another clean location object to replace this table in the font, ensuring that the old table is read first and to transfer or copy glyphs across from the read table to the new table. .SH "INSTANCE VARIABLES" .IX Header "INSTANCE VARIABLES" The instance variables do not start with a space .IP glyphs 4 .IX Item "glyphs" An array of glyph objects for each glyph. .IP glyphtype 4 .IX Item "glyphtype" A string containing the class name to create for each new glyph. If empty, defaults to Font::TTF::Glyph. .SH METHODS .IX Header "METHODS" .ie n .SS $t\->new .el .SS \f(CW$t\fP\->new .IX Subsection "$t->new" Creates a new location table making sure it has a glyphs array .ie n .SS $t\->read .el .SS \f(CW$t\fP\->read .IX Subsection "$t->read" Reads the location table creating glyph objects (Font::TTF::Glyph) for each glyph allowing their later reading. .ie n .SS $t\->out($fh) .el .SS \f(CW$t\fP\->out($fh) .IX Subsection "$t->out($fh)" Writes the location table out to \f(CW$fh\fR. Notice that not having read the location table implies that the glyf table has not been read either, so the numbers in the location table are still valid. Let's hope that \f(CW\*(C`maxp/numGlyphs\*(C'\fR and \&\f(CW\*(C`head/indexToLocFmt\*(C'\fR haven't changed otherwise we are in big trouble. .PP The function uses the OUTLOC location in the glyph calculated when the glyf table was attempted to be output. .ie n .SS "$t\->out_xml($context, $depth)" .el .SS "\f(CW$t\fP\->out_xml($context, \f(CW$depth\fP)" .IX Subsection "$t->out_xml($context, $depth)" No need to output a loca table, this is dynamically generated .ie n .SS $t\->glyphs_do(&func) .el .SS \f(CW$t\fP\->glyphs_do(&func) .IX Subsection "$t->glyphs_do(&func)" Calls func for each glyph in this location table in numerical order: .PP .Vb 1 \& &func($glyph, $glyph_num) .Ve .SH BUGS .IX Header "BUGS" None known .SH AUTHOR .IX Header "AUTHOR" Martin Hosken . .SH LICENSING .IX Header "LICENSING" Copyright (c) 1998\-2016, SIL International (http://www.sil.org) .PP This module is released under the terms of the Artistic License 2.0. For details, see the full text of the license in the file LICENSE.