.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" 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" '' '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 turned on, 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. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PDF::API2::Resource::BaseFont 3pm" .TH PDF::API2::Resource::BaseFont 3pm "2014-03-09" "perl v5.14.2" "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 font class .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 \f(CW$pdf\fR, \f(CW$name\fR" 4 .IX Item "$font = PDF::API2::Resource::BaseFont->new $pdf, $name" Returns a font resource object. .ie n .IP "$font = PDF::API2::Resource::BaseFont\->new_api $api, $name" 4 .el .IP "\f(CW$font\fR = PDF::API2::Resource::BaseFont\->new_api \f(CW$api\fR, \f(CW$name\fR" 4 .IX Item "$font = PDF::API2::Resource::BaseFont->new_api $api, $name" Returns a font resource object. This method is different from 'new' that it needs an PDF::API2\-object rather than a Text::PDF::File\-object. .ie n .IP "$descriptor = $font\->\fIdescrByData()\fR" 4 .el .IP "\f(CW$descriptor\fR = \f(CW$font\fR\->\fIdescrByData()\fR" 4 .IX Item "$descriptor = $font->descrByData()" Returns the fonts FontDescriptor key-structure based on the fonts data. .SH "FONT-MANAGEMENT RELATED METHODS" .IX Header "FONT-MANAGEMENT RELATED METHODS" .ie n .IP "$name = $font\->\fIfontname()\fR" 4 .el .IP "\f(CW$name\fR = \f(CW$font\fR\->\fIfontname()\fR" 4 .IX Item "$name = $font->fontname()" Returns the fonts name (aka. display-name). .ie n .IP "$name = $font\->\fIaltname()\fR" 4 .el .IP "\f(CW$name\fR = \f(CW$font\fR\->\fIaltname()\fR" 4 .IX Item "$name = $font->altname()" Returns the fonts alternative-name (aka. windows-name for a postscript font). .ie n .IP "$name = $font\->\fIsubname()\fR" 4 .el .IP "\f(CW$name\fR = \f(CW$font\fR\->\fIsubname()\fR" 4 .IX Item "$name = $font->subname()" Returns the fonts subname (aka. font-variant, schriftschnitt). .ie n .IP "$name = $font\->\fIapiname()\fR" 4 .el .IP "\f(CW$name\fR = \f(CW$font\fR\->\fIapiname()\fR" 4 .IX Item "$name = $font->apiname()" Returns the fonts name to be used internally (should be equal to \f(CW$font\fR\->name). .ie n .IP "$issymbol = $font\->\fIissymbol()\fR" 4 .el .IP "\f(CW$issymbol\fR = \f(CW$font\fR\->\fIissymbol()\fR" 4 .IX Item "$issymbol = $font->issymbol()" Returns the fonts symbol flag. .ie n .IP "$iscff = $font\->\fIiscff()\fR" 4 .el .IP "\f(CW$iscff\fR = \f(CW$font\fR\->\fIiscff()\fR" 4 .IX Item "$iscff = $font->iscff()" Returns the fonts compact-font-format flag. .SH "TYPOGRAPHY RELATED METHODS" .IX Header "TYPOGRAPHY RELATED METHODS" .ie n .IP "($llx, $lly, $urx, $ury) = $font\->\fIfontbbox()\fR" 4 .el .IP "($llx, \f(CW$lly\fR, \f(CW$urx\fR, \f(CW$ury\fR) = \f(CW$font\fR\->\fIfontbbox()\fR" 4 .IX Item "($llx, $lly, $urx, $ury) = $font->fontbbox()" Returns the fonts bounding-box. .ie n .IP "$capheight = $font\->\fIcapheight()\fR" 4 .el .IP "\f(CW$capheight\fR = \f(CW$font\fR\->\fIcapheight()\fR" 4 .IX Item "$capheight = $font->capheight()" Returns the fonts capheight value. .ie n .IP "$xheight = $font\->\fIxheight()\fR" 4 .el .IP "\f(CW$xheight\fR = \f(CW$font\fR\->\fIxheight()\fR" 4 .IX Item "$xheight = $font->xheight()" Returns the fonts xheight value. .ie n .IP "$missingwidth = $font\->\fImissingwidth()\fR" 4 .el .IP "\f(CW$missingwidth\fR = \f(CW$font\fR\->\fImissingwidth()\fR" 4 .IX Item "$missingwidth = $font->missingwidth()" Returns the fonts missingwidth value. .ie n .IP "$maxwidth = $font\->\fImaxwidth()\fR" 4 .el .IP "\f(CW$maxwidth\fR = \f(CW$font\fR\->\fImaxwidth()\fR" 4 .IX Item "$maxwidth = $font->maxwidth()" Returns the fonts maxwidth value. .ie n .IP "$avgwidth = $font\->\fIavgwidth()\fR" 4 .el .IP "\f(CW$avgwidth\fR = \f(CW$font\fR\->\fIavgwidth()\fR" 4 .IX Item "$avgwidth = $font->avgwidth()" Returns the fonts avgwidth value. .ie n .IP "$flags = $font\->\fIflags()\fR" 4 .el .IP "\f(CW$flags\fR = \f(CW$font\fR\->\fIflags()\fR" 4 .IX Item "$flags = $font->flags()" Returns the fonts flags value. .ie n .IP "$stemv = $font\->\fIstemv()\fR" 4 .el .IP "\f(CW$stemv\fR = \f(CW$font\fR\->\fIstemv()\fR" 4 .IX Item "$stemv = $font->stemv()" Returns the fonts stemv value. .ie n .IP "$stemh = $font\->\fIstemh()\fR" 4 .el .IP "\f(CW$stemh\fR = \f(CW$font\fR\->\fIstemh()\fR" 4 .IX Item "$stemh = $font->stemh()" Returns the fonts stemh value. .ie n .IP "$italicangle = $font\->\fIitalicangle()\fR" 4 .el .IP "\f(CW$italicangle\fR = \f(CW$font\fR\->\fIitalicangle()\fR" 4 .IX Item "$italicangle = $font->italicangle()" Returns the fonts italicangle value. .ie n .IP "$isfixedpitch = $font\->\fIisfixedpitch()\fR" 4 .el .IP "\f(CW$isfixedpitch\fR = \f(CW$font\fR\->\fIisfixedpitch()\fR" 4 .IX Item "$isfixedpitch = $font->isfixedpitch()" Returns the fonts isfixedpitch flag. .ie n .IP "$underlineposition = $font\->\fIunderlineposition()\fR" 4 .el .IP "\f(CW$underlineposition\fR = \f(CW$font\fR\->\fIunderlineposition()\fR" 4 .IX Item "$underlineposition = $font->underlineposition()" Returns the fonts underlineposition value. .ie n .IP "$underlinethickness = $font\->\fIunderlinethickness()\fR" 4 .el .IP "\f(CW$underlinethickness\fR = \f(CW$font\fR\->\fIunderlinethickness()\fR" 4 .IX Item "$underlinethickness = $font->underlinethickness()" Returns the fonts underlinethickness value. .ie n .IP "$ascender = $font\->\fIascender()\fR" 4 .el .IP "\f(CW$ascender\fR = \f(CW$font\fR\->\fIascender()\fR" 4 .IX Item "$ascender = $font->ascender()" Returns the fonts ascender value. .ie n .IP "$descender = $font\->\fIdescender()\fR" 4 .el .IP "\f(CW$descender\fR = \f(CW$font\fR\->\fIdescender()\fR" 4 .IX Item "$descender = $font->descender()" Returns the fonts descender value. .SH "GLYPH RELATED METHODS" .IX Header "GLYPH RELATED METHODS" .ie n .IP "@names = $font\->\fIglyphNames()\fR" 4 .el .IP "\f(CW@names\fR = \f(CW$font\fR\->\fIglyphNames()\fR" 4 .IX Item "@names = $font->glyphNames()" Returns the defined glyph-names of the font. .ie n .IP "$glNum = $font\->\fIglyphNum()\fR" 4 .el .IP "\f(CW$glNum\fR = \f(CW$font\fR\->\fIglyphNum()\fR" 4 .IX Item "$glNum = $font->glyphNum()" Returns 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 \f(CW$char\fR" 4 .IX Item "$uni = $font->uniByGlyph $char" Returns the unicode by glyph-name. .ie n .IP "$uni = $font\->uniByEnc $char" 4 .el .IP "\f(CW$uni\fR = \f(CW$font\fR\->uniByEnc \f(CW$char\fR" 4 .IX Item "$uni = $font->uniByEnc $char" Returns 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 \f(CW$char\fR" 4 .IX Item "$uni = $font->uniByMap $char" Returns the unicode by the fonts default map. .ie n .IP "$char = $font\->encByGlyph $glyph" 4 .el .IP "\f(CW$char\fR = \f(CW$font\fR\->encByGlyph \f(CW$glyph\fR" 4 .IX Item "$char = $font->encByGlyph $glyph" Returns the character by the given glyph-name of the fonts encoding map. .ie n .IP "$char = $font\->encByUni $uni" 4 .el .IP "\f(CW$char\fR = \f(CW$font\fR\->encByUni \f(CW$uni\fR" 4 .IX Item "$char = $font->encByUni $uni" Returns the character by the given unicode of the fonts encoding map. .ie n .IP "$char = $font\->mapByGlyph $glyph" 4 .el .IP "\f(CW$char\fR = \f(CW$font\fR\->mapByGlyph \f(CW$glyph\fR" 4 .IX Item "$char = $font->mapByGlyph $glyph" Returns the character by the given glyph-name of the fonts default map. .ie n .IP "$char = $font\->mapByUni $uni" 4 .el .IP "\f(CW$char\fR = \f(CW$font\fR\->mapByUni \f(CW$uni\fR" 4 .IX Item "$char = $font->mapByUni $uni" Returns the character by the given unicode of the fonts default map. .ie n .IP "$name = $font\->glyphByUni $unicode" 4 .el .IP "\f(CW$name\fR = \f(CW$font\fR\->glyphByUni \f(CW$unicode\fR" 4 .IX Item "$name = $font->glyphByUni $unicode" Returns the glyphs name by the fonts 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 \f(CW$char\fR" 4 .IX Item "$name = $font->glyphByEnc $char" Returns the glyphs name by the fonts encoding map. .ie n .IP "$name = $font\->glyphByMap $char" 4 .el .IP "\f(CW$name\fR = \f(CW$font\fR\->glyphByMap \f(CW$char\fR" 4 .IX Item "$name = $font->glyphByMap $char" Returns the glyphs name by the fonts default map. .ie n .IP "$width = $font\->wxByGlyph $glyph" 4 .el .IP "\f(CW$width\fR = \f(CW$font\fR\->wxByGlyph \f(CW$glyph\fR" 4 .IX Item "$width = $font->wxByGlyph $glyph" Returns the glyphs width. .ie n .IP "$width = $font\->wxByUni $uni" 4 .el .IP "\f(CW$width\fR = \f(CW$font\fR\->wxByUni \f(CW$uni\fR" 4 .IX Item "$width = $font->wxByUni $uni" Returns the unicodes width. .ie n .IP "$width = $font\->wxByEnc $char" 4 .el .IP "\f(CW$width\fR = \f(CW$font\fR\->wxByEnc \f(CW$char\fR" 4 .IX Item "$width = $font->wxByEnc $char" Returns the characters 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 \f(CW$char\fR" 4 .IX Item "$width = $font->wxByMap $char" Returns the characters width based on the fonts default encoding. .ie n .IP "$wd = $font\->width $text" 4 .el .IP "\f(CW$wd\fR = \f(CW$font\fR\->width \f(CW$text\fR" 4 .IX Item "$wd = $font->width $text" Returns the width of \f(CW$text\fR as if it were at size 1. \&\fB\s-1BEWARE:\s0\fR works only correctly if a proper perl-string is used either in native or utf8 format (check utf8\-flag). .ie n .IP "@widths = $font\->width_array $text" 4 .el .IP "\f(CW@widths\fR = \f(CW$font\fR\->width_array \f(CW$text\fR" 4 .IX Item "@widths = $font->width_array $text" Returns 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 "$utf8string = $font\->utfByStr $string" 4 .el .IP "\f(CW$utf8string\fR = \f(CW$font\fR\->utfByStr \f(CW$string\fR" 4 .IX Item "$utf8string = $font->utfByStr $string" Returns the utf8\-string from string based on the fonts encoding map. .ie n .IP "$string = $font\->strByUtf $utf8string" 4 .el .IP "\f(CW$string\fR = \f(CW$font\fR\->strByUtf \f(CW$utf8string\fR" 4 .IX Item "$string = $font->strByUtf $utf8string" Returns the encoded string from utf8\-string based on the fonts encoding map. .ie n .IP "$pdfstring = $font\->textByStr $text" 4 .el .IP "\f(CW$pdfstring\fR = \f(CW$font\fR\->textByStr \f(CW$text\fR" 4 .IX Item "$pdfstring = $font->textByStr $text" Returns a properly formatted representation of \f(CW$text\fR for use in the \s-1PDF\s0. .SH "AUTHOR" .IX Header "AUTHOR" Alfred Reibenschuh.