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

NAME

6       Font::TTF::Dumper - Debug dump of a font datastructure, avoiding
7       recursion on ' PARENT'
8

SYNOPSIS

10           use Font::TTF::Dumper;
11
12           # Print a table from the font structure:
13           print ttfdump($font->{$tag});
14
15           # Print font table with name
16           print ttfdump($font->{'head'}, 'head');
17
18           # Print font table with name and other options
19           print ttfdump($font->{'head'}, 'head', %opts);
20
21           # Print one glyph's data:
22           print ttfdump($font->{'loca'}->read->{'glyphs'}[$gid], "glyph_$gid");
23

DESCRIPTION

25       Font::TTF data structures are trees created from hashes and arrays.
26       When trying to figure out how the structures work, sometimes it is
27       helpful to use Data::Dumper on them. However, many of the object
28       structures have ' PARENT' links that refer back to the object's parent,
29       which means that Data::Dumper ends up dumping the whole font no matter
30       what.
31
32       The main purpose of this module is to invoke Data::Dumper with a filter
33       that skips over the ' PARENT' element of any hash.
34
35       To reduce output further, this module also skips over ' CACHE' elements
36       and any hash element whose value is a Font::TTF::Glyph or
37       Font::TTF::Font object.  (Really should make this configurable.)
38
39       If $opts{'d'}, then set Deepcopy mode to minimize use of
40       crossreferencing.
41

AUTHOR

43       Bob Hallissy <http://scripts.sil.org/FontUtils>.
44

LICENSING

46       Copyright (c) 1998-2016, SIL International (http://www.sil.org)
47
48       This module is released under the terms of the Artistic License 2.0.
49       For details, see the full text of the license in the file LICENSE.
50
51
52
53perl v5.34.0                      2021-07-22              Font::TTF::Dumper(3)
Impressum