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
31       max Maximum class value in a class table.
32

METHODS

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

AUTHOR

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

LICENSING

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