1PDF::API2::Resource::BaUsseeFronCto(n3t)ributed Perl DocPuDmFe:n:tAaPtIi2o:n:Resource::BaseFont(3)
2
3
4
6 PDF::API2::Resource::BaseFont - Base class for font resources
7
9 $font = PDF::API2::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, schriftschnitt).
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.
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 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 fonts 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 fonts default map.
113
114 $name = $font->glyphByUni($uni)
115 Return the glyph's name by the font's unicode map. BEWARE: non-
116 standard glyph-names are mapped onto the ms-symbol area (0xF000).
117
118 $name = $font->glyphByEnc($char)
119 Return the glyph's name by the font's encoding map.
120
121 $name = $font->glyphByMap($char)
122 Return the glyph's name by the font's default map.
123
124 $width = $font->wxByGlyph($glyph)
125 Return the glyph's width.
126
127 $width = $font->wxByUni($uni)
128 Return the unicode's width.
129
130 $width = $font->wxByEnc($char)
131 Return the character's width based on the current encoding.
132
133 $width = $font->wxByMap($char)
134 Return the character's width based on the font's default encoding.
135
136 $wd = $font->width($text)
137 Return the width of $text as if it were at size 1.
138
139 @widths = $font->width_array($text)
140 Return the widths of the words in $text as if they were at size 1.
141
143 $utf8_string = $font->utfByStr($string)
144 Return the utf8-string from string based on the font's encoding
145 map.
146
147 $string = $font->strByUtf($utf8_string)
148 Return the encoded string from utf8-string based on the font's
149 encoding map.
150
151 $pdf_string = $font->textByStr($text)
152 Return a properly formatted representation of $text for use in the
153 PDF.
154
155
156
157perl v5.32.1 2021-04-14 PDF::API2::Resource::BaseFont(3)