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

NAME

6       PDF::API2::Resource::BaseFont
7

METHODS

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

STRING METHODS

151       $utf8string = $font->utfByStr $string
152           Returns the utf8-string from string based on the fonts encoding
153           map.
154
155       $string = $font->strByUtf $utf8string
156           Returns the encoded string from utf8-string based on the fonts
157           encoding map.
158
159       $pdfstring = $font->textByStr $text
160           Returns a properly formatted representation of $text for use in the
161           PDF.
162

AUTHOR

164       Alfred Reibenschuh.
165
166
167
168perl v5.12.2                      2011-01-24  PDF::API2::Resource::BaseFont(3)
Impressum