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

PDF::API2::Resource::Font::SynFont - Module for creating synthetic Fonts.

    my $pdf = PDF::API2->new();
    my $base_font = $pdf->font('Helvetica');

    # Create a condensed synthetic font
    my $condensed = $pdf->synthetic_font($base_font, hscale => 80);

    # Compare the two fonts
    my $text = $pdf->page->text();

    $text->font($base_font, 18);
    $text->distance(72, 720);
    $text->text('Hello World!');

    $text->font($condensed, 18);
    $text->distance(0, -36);
    $text->text('Hello World!');

    $pdf->save('sample.pdf');

This module allows you to create a custom font based on an existing font, adjusting the scale, stroke thickness, angle, and other properties of each glyph.

A percentage to condense (less than 100) or expand (greater than 100) the glyphs horizontally.

A number of degrees to lean the glyphs to the left (negative angle) or to the right (positive angle).

A stroke width, in thousandths of a text unit, to add to the glyph's outline, creating a bold effect.

Set to true to replace lower-case characters with small versions of their upper-case glyphs.

Additional space, in thousandths of a text unit, to add between glyphs.
2021-12-08 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.