1Font::TTF::Coverage(3)User Contributed Perl DocumentationFont::TTF::Coverage(3)
2
3
4

NAME

6       Font::TTF::Coverage - Opentype coverage and class definition objects
7

DESCRIPTION

9       Coverage tables and class definition objects are virtually identical
10       concepts in OpenType. Their difference comes purely in their storage.
11       Therefore we can say that a coverage table is a class definition in
12       which the class definition for each glyph is the corresponding index in
13       the coverage table. The resulting data structure is that a Coverage
14       table has the following fields:
15
16       cover
17           A boolean to indicate whether this table is a coverage table (TRUE)
18           or a class definition (FALSE)
19
20       val A hash of glyph ids against values (either coverage index or class
21           value)
22
23       fmt The storage format used is given here, but is recalculated when the
24           table is written out.
25
26       count
27           A count of the elements in a coverage table for use with add. Each
28           subsequent addition is added with the current count and increments
29           the count.
30

METHODS

32   new($isCover [, vals])
33       Creates a new coverage table or class definition table, depending upon
34       the value of $isCover. if $isCover then vals may be a list of glyphs to
35       include in order.  If no $isCover, then vals is a hash of glyphs
36       against class values.
37
38   read($fh)
39       Reads the coverage/class table from the given file handle
40
41   out($fh, $state)
42       Writes the coverage/class table to the given file handle. If $state is
43       1 then the output string is returned rather than being output to a
44       filehandle.
45
46   $c->add($glyphid[, $class])
47       Adds a glyph id to the coverage table incrementing the count so that
48       each subsequent addition has the next sequential number. Returns the
49       index number of the glyphid added
50
51   $c->signature
52       Returns a vector of all the glyph ids covered by this coverage table or
53       class
54
55   @map=$c->sort
56       Sorts the coverage table so that indexes are in ascending order of
57       glyphid.  Returns a map such that $map[$new_index]=$old_index.
58
59   $c->out_xml($context)
60       Outputs this coverage/class in XML
61

AUTHOR

63       Martin Hosken Martin_Hosken@sil.org. See Font::TTF::Font for copyright
64       and licensing.
65

POD ERRORS

67       Hey! The above document had some coding errors, which are explained
68       below:
69
70       Around line 15:
71           '=item' outside of any '=over'
72
73       Around line 34:
74           You forgot a '=back' before '=head1'
75
76
77
78perl v5.16.3                      2011-10-13            Font::TTF::Coverage(3)
Impressum