PDF::API2::CoreFont - a perl-module providing core-font objects for both Text::PDF and PDF::API2.
use PDF::API2; use PDF::API2::CoreFont; |
$api = PDF::API2->new; ... $font = PDF::API2::CoreFont->new_api($api,'Helvetica', -encode => 'latin1'); |
OR
use PDF::API2::PDF::File; use PDF::API2::CoreFont; |
$pdf = PDF::API2::PDF::File->new('some.pdf'); ... $font = PDF::API2::CoreFont->new($pdf,'Helvetica', -encode => 'latin1', -pdfname => 'F0'); |
Returns a corefont object.
Valid %options are:
'-encode' ... changes the encoding of the font from its default. |
'-pdfname' ... changes the reference-name of the font from its default. |
On '-encode': The natively supported encodings are 'latin1','winansi' and 'macroman'. Other Encodings are supported via PDF::API2::UniMap.
On '-pdfname': The reference-name is normally generated automatically and can be retrived via $pdfname=$font->name.
Returns a corefont object. This method is different from 'new' that it needs an PDF::API2-object rather than a PDF::API2::PDF::File-object.
"Requires in" all fonts available as corefonts.
Returns a properly formated string-representation of $text for use in the PDF.
Returns a properly formated hex-representation of $text for use in the PDF.
Returns the width of $text as if it were at size 1.
Returns the widths of the words in $text as if they were at size 1.
Returns the fonts pdfname.
Returns the fonts ascender value.
Returns the fonts descender value.
Returns the fonts italicangle value.
Returns the fonts bounding-box.
Returns the fonts capheight value.
Returns the fonts xheight.
Returns the fonts underlineposition.
Courier Courier-Bold Courier-BoldOblique Courier-Oblique Helvetica Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique Symbol Times-Bold Times-BoldItalic Times-Italic Times-Roman ZapfDingbats |
Arial Arial,Bold Arial,BoldItalic Arial,Italic BankGothic BankGothic,Bold BankGothic,BoldItalic BankGothic,Italic CourierNew CourierNew,Bold CourierNew,BoldItalic CourierNew,Italic Georgia Georgia,Bold Georgia,BoldItalic Georgia,Italic Impact Impact,Italic OzHandicraft OzHandicraft,Bold OzHandicraft,BoldItalic OzHandicraft,Italic TimesNewRoman TimesNewRoman,Bold TimesNewRoman,BoldItalic TimesNewRoman,Italic Trebuchet Trebuchet,Bold Trebuchet,BoldItalic Trebuchet,Italic Verdana Verdana,Bold Verdana,BoldItalic Verdana,Italic Webdings Wingdings |
sans sans,bold sans,bolditalic sans,italic serif serif,bold serif,bolditalic serif,italic typewriter typewriter,bold typewriter,bolditalic typewriter,italic greek bats |
alfred reibenschuh