.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "PDF::API2::Resource::BaseFont 3"
.TH PDF::API2::Resource::BaseFont 3 "2021-12-08" "perl v5.26.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
PDF::API2::Resource::BaseFont \- Base class for font resources
.SH "METHODS"
.IX Header "METHODS"
.ie n .IP "$font = PDF::API2::Resource::BaseFont\->new($pdf, $name)" 4
.el .IP "\f(CW$font\fR = PDF::API2::Resource::BaseFont\->new($pdf, \f(CW$name\fR)" 4
.IX Item "$font = PDF::API2::Resource::BaseFont->new($pdf, $name)"
Return a font resource object.
.ie n .IP "$descriptor = $font\->\fBdescrByData()\fR" 4
.el .IP "\f(CW$descriptor\fR = \f(CW$font\fR\->\fBdescrByData()\fR" 4
.IX Item "$descriptor = $font->descrByData()"
Return the font's FontDescriptor key structure based on the font's data.
.SH "FONT-MANAGEMENT RELATED METHODS"
.IX Header "FONT-MANAGEMENT RELATED METHODS"
.ie n .IP "$name = $font\->\fBfontname()\fR" 4
.el .IP "\f(CW$name\fR = \f(CW$font\fR\->\fBfontname()\fR" 4
.IX Item "$name = $font->fontname()"
Return the font's name (a.k.a. display name).
.ie n .IP "$name = $font\->\fBaltname()\fR" 4
.el .IP "\f(CW$name\fR = \f(CW$font\fR\->\fBaltname()\fR" 4
.IX Item "$name = $font->altname()"
Return the font's alternative name (a.k.a. Windows name for a postscript font).
.ie n .IP "$name = $font\->\fBsubname()\fR" 4
.el .IP "\f(CW$name\fR = \f(CW$font\fR\->\fBsubname()\fR" 4
.IX Item "$name = $font->subname()"
Return the font's subname (a.k.a. font variant, schriftschnitt).
.ie n .IP "$name = $font\->\fBapiname()\fR" 4
.el .IP "\f(CW$name\fR = \f(CW$font\fR\->\fBapiname()\fR" 4
.IX Item "$name = $font->apiname()"
Return the font's name to be used internally (should be equal to \f(CW$font\fR\->\fBname()\fR).
.ie n .IP "$issymbol = $font\->\fBissymbol()\fR" 4
.el .IP "\f(CW$issymbol\fR = \f(CW$font\fR\->\fBissymbol()\fR" 4
.IX Item "$issymbol = $font->issymbol()"
Return the font's symbol flag.
.ie n .IP "$iscff = $font\->\fBiscff()\fR" 4
.el .IP "\f(CW$iscff\fR = \f(CW$font\fR\->\fBiscff()\fR" 4
.IX Item "$iscff = $font->iscff()"
Return the font's Compact Font Format flag.
.SH "TYPOGRAPHY RELATED METHODS"
.IX Header "TYPOGRAPHY RELATED METHODS"
.ie n .IP "($llx, $lly, $urx, $ury) = $font\->\fBfontbbox()\fR" 4
.el .IP "($llx, \f(CW$lly\fR, \f(CW$urx\fR, \f(CW$ury\fR) = \f(CW$font\fR\->\fBfontbbox()\fR" 4
.IX Item "($llx, $lly, $urx, $ury) = $font->fontbbox()"
Return the font's bounding box.
.ie n .IP "$capheight = $font\->\fBcapheight()\fR" 4
.el .IP "\f(CW$capheight\fR = \f(CW$font\fR\->\fBcapheight()\fR" 4
.IX Item "$capheight = $font->capheight()"
Return the font's capheight value.
.ie n .IP "$xheight = $font\->\fBxheight()\fR" 4
.el .IP "\f(CW$xheight\fR = \f(CW$font\fR\->\fBxheight()\fR" 4
.IX Item "$xheight = $font->xheight()"
Return the font's xheight value.
.ie n .IP "$missingwidth = $font\->\fBmissingwidth()\fR" 4
.el .IP "\f(CW$missingwidth\fR = \f(CW$font\fR\->\fBmissingwidth()\fR" 4
.IX Item "$missingwidth = $font->missingwidth()"
Return the font's missingwidth value.
.ie n .IP "$maxwidth = $font\->\fBmaxwidth()\fR" 4
.el .IP "\f(CW$maxwidth\fR = \f(CW$font\fR\->\fBmaxwidth()\fR" 4
.IX Item "$maxwidth = $font->maxwidth()"
Return the font's maxwidth value.
.ie n .IP "$avgwidth = $font\->\fBavgwidth()\fR" 4
.el .IP "\f(CW$avgwidth\fR = \f(CW$font\fR\->\fBavgwidth()\fR" 4
.IX Item "$avgwidth = $font->avgwidth()"
Return the font's avgwidth value.
.ie n .IP "$flags = $font\->\fBflags()\fR" 4
.el .IP "\f(CW$flags\fR = \f(CW$font\fR\->\fBflags()\fR" 4
.IX Item "$flags = $font->flags()"
Return the font's flags value.
.ie n .IP "$stemv = $font\->\fBstemv()\fR" 4
.el .IP "\f(CW$stemv\fR = \f(CW$font\fR\->\fBstemv()\fR" 4
.IX Item "$stemv = $font->stemv()"
Return the font's stemv value.
.ie n .IP "$stemh = $font\->\fBstemh()\fR" 4
.el .IP "\f(CW$stemh\fR = \f(CW$font\fR\->\fBstemh()\fR" 4
.IX Item "$stemh = $font->stemh()"
Return the font's stemh value.
.ie n .IP "$italicangle = $font\->\fBitalicangle()\fR" 4
.el .IP "\f(CW$italicangle\fR = \f(CW$font\fR\->\fBitalicangle()\fR" 4
.IX Item "$italicangle = $font->italicangle()"
Return the font's italicangle value.
.ie n .IP "$isfixedpitch = $font\->\fBisfixedpitch()\fR" 4
.el .IP "\f(CW$isfixedpitch\fR = \f(CW$font\fR\->\fBisfixedpitch()\fR" 4
.IX Item "$isfixedpitch = $font->isfixedpitch()"
Return the font's isfixedpitch flag.
.ie n .IP "$underlineposition = $font\->\fBunderlineposition()\fR" 4
.el .IP "\f(CW$underlineposition\fR = \f(CW$font\fR\->\fBunderlineposition()\fR" 4
.IX Item "$underlineposition = $font->underlineposition()"
Return the font's underlineposition value.
.ie n .IP "$underlinethickness = $font\->\fBunderlinethickness()\fR" 4
.el .IP "\f(CW$underlinethickness\fR = \f(CW$font\fR\->\fBunderlinethickness()\fR" 4
.IX Item "$underlinethickness = $font->underlinethickness()"
Return the font's underlinethickness value.
.ie n .IP "$ascender = $font\->\fBascender()\fR" 4
.el .IP "\f(CW$ascender\fR = \f(CW$font\fR\->\fBascender()\fR" 4
.IX Item "$ascender = $font->ascender()"
Return the font's ascender value.
.ie n .IP "$descender = $font\->\fBdescender()\fR" 4
.el .IP "\f(CW$descender\fR = \f(CW$font\fR\->\fBdescender()\fR" 4
.IX Item "$descender = $font->descender()"
Return the font's descender value.
.SH "GLYPH RELATED METHODS"
.IX Header "GLYPH RELATED METHODS"
.ie n .IP "@names = $font\->\fBglyphNames()\fR" 4
.el .IP "\f(CW@names\fR = \f(CW$font\fR\->\fBglyphNames()\fR" 4
.IX Item "@names = $font->glyphNames()"
Return the defined glyph names of the font.
.ie n .IP "$glNum = $font\->\fBglyphNum()\fR" 4
.el .IP "\f(CW$glNum\fR = \f(CW$font\fR\->\fBglyphNum()\fR" 4
.IX Item "$glNum = $font->glyphNum()"
Return the number of defined glyph names of the font.
.ie n .IP "$uni = $font\->uniByGlyph($char)" 4
.el .IP "\f(CW$uni\fR = \f(CW$font\fR\->uniByGlyph($char)" 4
.IX Item "$uni = $font->uniByGlyph($char)"
Return the unicode by glyph name.
.ie n .IP "$uni = $font\->uniByEnc($char)" 4
.el .IP "\f(CW$uni\fR = \f(CW$font\fR\->uniByEnc($char)" 4
.IX Item "$uni = $font->uniByEnc($char)"
Return the unicode by the fonts encoding map.
.ie n .IP "$uni = $font\->uniByMap($char)" 4
.el .IP "\f(CW$uni\fR = \f(CW$font\fR\->uniByMap($char)" 4
.IX Item "$uni = $font->uniByMap($char)"
Return the unicode by the font's default map.
.ie n .IP "$char = $font\->encByGlyph($glyph)" 4
.el .IP "\f(CW$char\fR = \f(CW$font\fR\->encByGlyph($glyph)" 4
.IX Item "$char = $font->encByGlyph($glyph)"
Return the character by the given glyph name of the font's encoding map.
.ie n .IP "$char = $font\->encByUni($uni)" 4
.el .IP "\f(CW$char\fR = \f(CW$font\fR\->encByUni($uni)" 4
.IX Item "$char = $font->encByUni($uni)"
Return the character by the given unicode of the font's encoding map.
.ie n .IP "$char = $font\->mapByGlyph($glyph)" 4
.el .IP "\f(CW$char\fR = \f(CW$font\fR\->mapByGlyph($glyph)" 4
.IX Item "$char = $font->mapByGlyph($glyph)"
Return the character by the given glyph name of the font's default map.
.ie n .IP "$char = $font\->mapByUni($uni)" 4
.el .IP "\f(CW$char\fR = \f(CW$font\fR\->mapByUni($uni)" 4
.IX Item "$char = $font->mapByUni($uni)"
Return the character by the given unicode of the fonts default map.
.ie n .IP "$name = $font\->glyphByUni($uni)" 4
.el .IP "\f(CW$name\fR = \f(CW$font\fR\->glyphByUni($uni)" 4
.IX Item "$name = $font->glyphByUni($uni)"
Return the glyph's name by the font's unicode map.
\&\fB\s-1BEWARE:\s0\fR non-standard glyph-names are mapped onto
the ms-symbol area (0xF000).
.ie n .IP "$name = $font\->glyphByEnc($char)" 4
.el .IP "\f(CW$name\fR = \f(CW$font\fR\->glyphByEnc($char)" 4
.IX Item "$name = $font->glyphByEnc($char)"
Return the glyph's name by the font's encoding map.
.ie n .IP "$name = $font\->glyphByMap($char)" 4
.el .IP "\f(CW$name\fR = \f(CW$font\fR\->glyphByMap($char)" 4
.IX Item "$name = $font->glyphByMap($char)"
Return the glyph's name by the font's default map.
.ie n .IP "$width = $font\->wxByGlyph($glyph)" 4
.el .IP "\f(CW$width\fR = \f(CW$font\fR\->wxByGlyph($glyph)" 4
.IX Item "$width = $font->wxByGlyph($glyph)"
Return the glyph's width.
.ie n .IP "$width = $font\->wxByUni($uni)" 4
.el .IP "\f(CW$width\fR = \f(CW$font\fR\->wxByUni($uni)" 4
.IX Item "$width = $font->wxByUni($uni)"
Return the unicode's width.
.ie n .IP "$width = $font\->wxByEnc($char)" 4
.el .IP "\f(CW$width\fR = \f(CW$font\fR\->wxByEnc($char)" 4
.IX Item "$width = $font->wxByEnc($char)"
Return the character's width based on the current encoding.
.ie n .IP "$width = $font\->wxByMap($char)" 4
.el .IP "\f(CW$width\fR = \f(CW$font\fR\->wxByMap($char)" 4
.IX Item "$width = $font->wxByMap($char)"
Return the character's width based on the font's default encoding.
.ie n .IP "$wd = $font\->width($text)" 4
.el .IP "\f(CW$wd\fR = \f(CW$font\fR\->width($text)" 4
.IX Item "$wd = $font->width($text)"
Return the width of \f(CW$text\fR as if it were at size 1.
.ie n .IP "@widths = $font\->width_array($text)" 4
.el .IP "\f(CW@widths\fR = \f(CW$font\fR\->width_array($text)" 4
.IX Item "@widths = $font->width_array($text)"
Return the widths of the words in \f(CW$text\fR as if they were at size 1.
.SH "STRING METHODS"
.IX Header "STRING METHODS"
.ie n .IP "$utf8_string = $font\->utfByStr($string)" 4
.el .IP "\f(CW$utf8_string\fR = \f(CW$font\fR\->utfByStr($string)" 4
.IX Item "$utf8_string = $font->utfByStr($string)"
Return the utf8\-string from string based on the font's encoding map.
.ie n .IP "$string = $font\->strByUtf($utf8_string)" 4
.el .IP "\f(CW$string\fR = \f(CW$font\fR\->strByUtf($utf8_string)" 4
.IX Item "$string = $font->strByUtf($utf8_string)"
Return the encoded string from utf8\-string based on the font's encoding map.
.ie n .IP "$pdf_string = $font\->textByStr($text)" 4
.el .IP "\f(CW$pdf_string\fR = \f(CW$font\fR\->textByStr($text)" 4
.IX Item "$pdf_string = $font->textByStr($text)"
Return a properly formatted representation of \f(CW$text\fR for use in the \s-1PDF.\s0