.\" Automatically generated by Pod::Man 4.14 (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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 "2023-09-29" "perl v5.36.0" "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.