Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

PDF::API2::Resource::Font::SynFont

Name PDF::API2::Resource::Font::SynFont
Version 2.043
Located at /usr/local/share/perl5
File /usr/local/share/perl5/PDF/API2/Resource/Font/SynFont.pm
Is Core No
Search CPAN for this module PDF::API2::Resource::Font::SynFont
Documentation PDF::API2::Resource::Font::SynFont
Module Details PDF::API2::Resource::Font::SynFont

NAME

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


SYNOPSIS

    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');


DESCRIPTION

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.


FONT OPTIONS

hscale

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

angle

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

bold

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

smallcaps

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

space

Additional space, in thousandths of a text unit, to add between glyphs.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024