1PDF::Builder::Resource:U:sBearseCFoonnttr(i3b)uted PerlPDDoFc:u:mBeunitladteiro:n:Resource::BaseFont(3)
2
3
4

NAME

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

METHODS

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

STRING METHODS

163       $utf8string = $font->utfByStr($string)
164           Return the utf8-string from string based on the font's encoding
165           map.
166
167       $string = $font->strByUtf($utf8_string)
168           Return the encoded string from utf8-string based on the font's
169           encoding map.
170
171       $pdf_string = $font->textByStr($string)
172           Return a properly formatted representation of $string for use in
173           the PDF.
174
175       $pdf_string = $font->textByStrKern($string)
176           Return a properly formatted representation of $string, with
177           kerning, for use in the PDF.
178
179
180
181perl v5.34.0                      2022-01-21PDF::Builder::Resource::BaseFont(3)
Impressum