1PDF::API2::Resource::BaUsseeFronCto(n3t)ributed Perl DocPuDmFe:n:tAaPtIi2o:n:Resource::BaseFont(3)
2
3
4

NAME

6       PDF::API2::Resource::BaseFont - Base class for font resources
7

METHODS

9       $font = PDF::API2::Resource::BaseFont->new $pdf, $name
10           Returns a font resource object.
11
12       $descriptor = $font->descrByData()
13           Returns the font's FontDescriptor key-structure based on the font's
14           data.
15
17       $name = $font->fontname()
18           Returns the font's name (aka. display-name).
19
20       $name = $font->altname()
21           Returns the font's alternative-name (aka. windows-name for a
22           postscript font).
23
24       $name = $font->subname()
25           Returns the font's subname (aka. font-variant, schriftschnitt).
26
27       $name = $font->apiname()
28           Returns the font's name to be used internally (should be equal to
29           $font->name).
30
31       $issymbol = $font->issymbol()
32           Returns the font's symbol flag.
33
34       $iscff = $font->iscff()
35           Returns the font's compact-font-format flag.
36
38       ($llx, $lly, $urx, $ury) = $font->fontbbox()
39           Returns the font's bounding-box.
40
41       $capheight = $font->capheight()
42           Returns the font's capheight value.
43
44       $xheight = $font->xheight()
45           Returns the font's xheight value.
46
47       $missingwidth = $font->missingwidth()
48           Returns the font's missingwidth value.
49
50       $maxwidth = $font->maxwidth()
51           Returns the font's maxwidth value.
52
53       $avgwidth = $font->avgwidth()
54           Returns the font's avgwidth value.
55
56       $flags = $font->flags()
57           Returns the font's flags value.
58
59       $stemv = $font->stemv()
60           Returns the font's stemv value.
61
62       $stemh = $font->stemh()
63           Returns the font's stemh value.
64
65       $italicangle = $font->italicangle()
66           Returns the font's italicangle value.
67
68       $isfixedpitch = $font->isfixedpitch()
69           Returns the font's isfixedpitch flag.
70
71       $underlineposition = $font->underlineposition()
72           Returns the font's underlineposition value.
73
74       $underlinethickness = $font->underlinethickness()
75           Returns the font's underlinethickness value.
76
77       $ascender = $font->ascender()
78           Returns the font's ascender value.
79
80       $descender = $font->descender()
81           Returns the font's descender value.
82
84       @names = $font->glyphNames()
85           Returns the defined glyph-names of the font.
86
87       $glNum = $font->glyphNum()
88           Returns the number of defined glyph-names of the font.
89
90       $uni = $font->uniByGlyph $char
91           Returns the unicode by glyph-name.
92
93       $uni = $font->uniByEnc $char
94           Returns the unicode by the fonts encoding map.
95
96       $uni = $font->uniByMap $char
97           Returns the unicode by the fonts default map.
98
99       $char = $font->encByGlyph $glyph
100           Returns the character by the given glyph-name of the fonts encoding
101           map.
102
103       $char = $font->encByUni $uni
104           Returns the character by the given unicode of the fonts encoding
105           map.
106
107       $char = $font->mapByGlyph $glyph
108           Returns the character by the given glyph-name of the fonts default
109           map.
110
111       $char = $font->mapByUni $uni
112           Returns the character by the given unicode of the fonts default
113           map.
114
115       $name = $font->glyphByUni $unicode
116           Returns the glyph's name by the fonts unicode map.  BEWARE: non-
117           standard glyph-names are mapped onto the ms-symbol area (0xF000).
118
119       $name = $font->glyphByEnc $char
120           Returns the glyph's name by the font's encoding map.
121
122       $name = $font->glyphByMap $char
123           Returns the glyph's name by the font's default map.
124
125       $width = $font->wxByGlyph $glyph
126           Returns the glyph's width.
127
128       $width = $font->wxByUni $uni
129           Returns the unicode's width.
130
131       $width = $font->wxByEnc $char
132           Returns the character's width based on the current encoding.
133
134       $width = $font->wxByMap $char
135           Returns the character's width based on the font's default encoding.
136
137       $wd = $font->width $text
138           Returns the width of $text as if it were at size 1.  BEWARE: works
139           only correctly if a proper perl-string is used either in native or
140           utf8 format (check utf8-flag).
141
142       @widths = $font->width_array $text
143           Returns the widths of the words in $text as if they were at size 1.
144

STRING METHODS

146       $utf8string = $font->utfByStr $string
147           Returns the utf8-string from string based on the fonts encoding
148           map.
149
150       $string = $font->strByUtf $utf8string
151           Returns the encoded string from utf8-string based on the font's
152           encoding map.
153
154       $pdfstring = $font->textByStr $text
155           Returns a properly formatted representation of $text for use in the
156           PDF.
157
158
159
160perl v5.28.1                      2017-07-07  PDF::API2::Resource::BaseFont(3)
Impressum