.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PDF::API2::Resource::Font::SynFont 3pm" .TH PDF::API2::Resource::Font::SynFont 3pm 2024-05-17 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PDF::API2::Resource::Font::SynFont \- Module for creating synthetic Fonts. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& my $pdf = PDF::API2\->new(); \& my $base_font = $pdf\->font(\*(AqHelvetica\*(Aq); \& \& # 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(\*(AqHello World!\*(Aq); \& \& $text\->font($condensed, 18); \& $text\->distance(0, \-36); \& $text\->text(\*(AqHello World!\*(Aq); \& \& $pdf\->save(\*(Aqsample.pdf\*(Aq); .Ve .SH DESCRIPTION .IX Header "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. .SH "FONT OPTIONS" .IX Header "FONT OPTIONS" .SS hscale .IX Subsection "hscale" A percentage to condense (less than 100) or expand (greater than 100) the glyphs horizontally. .SS angle .IX Subsection "angle" A number of degrees to lean the glyphs to the left (negative angle) or to the right (positive angle). .SS bold .IX Subsection "bold" A stroke width, in thousandths of a text unit, to add to the glyph's outline, creating a bold effect. .SS smallcaps .IX Subsection "smallcaps" Set to true to replace lower-case characters with small versions of their upper-case glyphs. .SS space .IX Subsection "space" Additional space, in thousandths of a text unit, to add between glyphs.