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

NAME

6       Font::TTF::Table - Superclass for tables and used for tables we don't
7       have a class for
8

DESCRIPTION

10       Looks after the purely table aspects of a TTF table, such as whether
11       the table has been read before, locating the file pointer, etc. Also
12       copies tables from input to output.
13

INSTANCE VARIABLES

15       Instance variables start with a space
16
17       read
18           Flag which indicates that the table has already been read from
19           file.
20
21       dat Allows the creation of unspecific tables. Data is simply output to
22           any font file being created.
23
24       INFILE
25           The read file handle
26
27       OFFSET
28           Location of the file in the input file
29
30       LENGTH
31           Length in the input directory
32
33       CSUM
34           Checksum read from the input file's directory
35
36       PARENT
37           The Font::TTF::Font that table is part of
38

METHODS

40   Font::TTF::Table->new(%parms)
41       Creates a new table or subclass. Table instance variables are passed in
42       at this point as an associative array.
43
44   $t->read
45       Reads the table from the input file. Acts as a superclass to all true
46       tables.  This method marks the table as read and then just sets the
47       input file pointer but does not read any data. If the table has already
48       been read, then returns "undef" else returns $self
49
50   $t->read_dat
51       Reads the table into the "dat" instance variable for those tables which
52       don't know any better
53
54   $t->out($fh)
55       Writes out the table to the font file. If there is anything in the
56       "data" instance variable then this is output, otherwise the data is
57       copied from the input file to the output
58
59   $t->out_xml($context)
60       Outputs this table in XML format. The table is first read (if not
61       already read) and then if there is no subclass, then the data is dumped
62       as hex data
63
64   $t->XML_element
65       Output a particular element based on its contents.
66
67   $t->XML_end($context, $tag, %attrs)
68       Handles the default type of <data> for those tables which aren't
69       subclassed
70
71   $t->dirty($val)
72       This sets the dirty flag to the given value or 1 if no given value. It
73       returns the value of the flag
74
75   $t->update
76       Each table knows how to update itself. This consists of doing whatever
77       work is required to ensure that the memory version of the table is
78       consistent and that other parameters in other tables have been updated
79       accordingly.  I.e. by the end of sending "update" to all the tables,
80       the memory version of the font should be entirely consistent.
81
82       Some tables which do no work indicate to themselves the need to update
83       themselves by setting isDirty above 1. This method resets that
84       accordingly.
85
86   $t->empty
87       Clears a table of all data to the level of not having been read
88
89   $t->release
90       Releases ALL of the memory used by this table, and all of its
91       component/child objects.  This method is called automatically by
92       'Font::TTF::Font->release' (so you don't have to call it yourself).
93
94       NOTE, that it is important that this method get called at some point
95       prior to the actual destruction of the object.  Internally, we track
96       things in a structure that can result in circular references, and
97       without calling '"release()"' these will not properly get cleaned up by
98       Perl.  Once this method has been called, though, don't expect to be
99       able to do anything with the "Font::TTF::Table" object; it'll have no
100       internal state whatsoever.
101
102       Developer note:  As part of the brute-force cleanup done here, this
103       method will throw a warning message whenever unexpected key values are
104       found within the "Font::TTF::Table" object.  This is done to help
105       ensure that any unexpected and unfreed values are brought to your
106       attention so that you can bug us to keep the module updated properly;
107       otherwise the potential for memory leaks due to dangling circular
108       references will exist.
109

BUGS

111       No known bugs
112

AUTHOR

114       Martin Hosken Martin_Hosken@sil.org. See Font::TTF::Font for copyright
115       and licensing.
116
117
118
119perl v5.10.1                      2008-06-11               Font::TTF::Table(3)
Impressum