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::SynFont(3) User Contributed Perl Documentation PDF::Builder::Resource::Font::SynFont(3)

PDF::Builder::Resource::Font::SynFont - Module for using synthetic Fonts.

    #
    use PDF::Builder;
    #
    $pdf = PDF::Builder->new();
    $cft = $pdf->corefont('Times-Roman');  # ttfont, etc. also works
    $sft = $pdf->synfont($cft, -condense => .75);  # condense by 25%
    #

This works for corefonts, PS fonts, and TTF/OTF fonts; but does not work for CJK fonts or bitmapped fonts. See also "Synthetic Fonts" in PDF::Builder::Docs.

$font = PDF::Builder::Resource::Font::SynFont->new($pdf, $fontobj, %options)
Returns a synfont 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 supported. Multibyte encodings such as UTF-8 are invalid.

-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().

-condense ... condense/expand factor (0.1-0.9 = condense, 1 = normal, 1.1+ = expand). It's the multiplier for character widths vs. normal.

-oblique ... italic angle (+/-) in degrees, where the character box is skewed. While it's unlikely that anyone will want to slant characters at +/-360 degrees, they should be aware that these will be treated as an angle of 0 degrees (deg2rad() wraps around). 0 degrees of italic slant (obliqueness) is the default.

-bold ... embolding factor (0.1+, bold=1, heavy=2, ...). It is additional outline thickness (linewidth), which expands the character outwards.

-space ... additional charspacing in em (0-1000).

-caps ... create synthetic small-caps. 0 = no, 1 = yes. These are capitals of lowercase letters, at 80% height and 88% width.

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.