GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PDF::Builder::Resource::Font::CoreFont(3) User Contributed Perl Documentation PDF::Builder::Resource::Font::CoreFont(3)

PDF::Builder::Resource::Font::CoreFont - Module for using the 14 PDF built-in Fonts.

    #
    use PDF::Builder;
    #
    $pdf = PDF::Builder->new();
    $cft = $pdf->corefont('Times-Roman');
    #

$font = PDF::Builder::Resource::Font::CoreFont->new($pdf, $fontname, %options)
$font = PDF::Builder::Resource::Font::CoreFont->new($pdf, $fontname)
Returns a corefont object.

Valid %options are:

-encode ... changes the encoding of the font from its default. See perl's Encode for the supported values. Warning: only single byte encodings are permitted. Multibyte encodings such as 'utf8' are forbidden.

-pdfname ... changes the reference-name of the font from its default. The reference-name is normally generated automatically and can be retrieved via "$pdfname=$font-"name()>.

standard PDF types
helvetica helveticaoblique helveticabold helvetiaboldoblique
May have Arial substituted on some systems (e.g., Windows)
courier courieroblique courierbold courierboldoblique
Fixed pitch, may have Courier New substituted on some systems (e.g., Windows)
timesroman timesitalic timesbold timesbolditalic
May have Times New Roman substituted on some systems (e.g., Windows)
symbol zapfdingbats

Primarily Windows typefaces

georgia georgiaitalic georgiabold georgiabolditalic
verdana verdanaitalic verdanabold verdanabolditalic
trebuchet trebuchetitalic trebuchetbold trebuchetbolditalic
bankgothic bankgothicitalic bankgothicbold bankgothicitalic
Free versions of Bank Gothic are often only medium weight.
webdings wingdings

Keep in mind that only font metrics (widths) are provided with PDF::Builder; the fonts themselves are provided by the reader's machine (often packaged with the operating system, or obtained separately by the user). To use a specific font may require you to obtain one or more files from some source.

If a font (typeface and variant) is not available on a given reader's machine, a substitution may be automatically made. For example, Helvetica is usually not shipped with Windows machines, and Arial might be substituted. For most characters, the glyph widths will be the same, but this can not be guaranteed!

PDF::Builder currently uses the [typeface].pm files to map glyph names to code points (single byte encodings only) and to look up the glyph widths for character positioning. There is no guarantee that a given font file includes all the desired glyphs, nor that the widths will be absolutely the same, even in different releases of the same font.

PDF::Builder::Resource::Font::CoreFont->loadallfonts()
"Requires in" all fonts available as corefonts.

Alfred Reibenschuh
2021-07-16 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.