.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" 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 "Graphics::Primitive::Font 3pm" .TH Graphics::Primitive::Font 3pm "2022-06-14" "perl v5.34.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" Graphics::Primitive::Font \- Text styling .SH "DESCRIPTION" .IX Header "DESCRIPTION" Graphics::Primitive::Font represents the various options that are available when rendering text. The options here may or may not have an effect on your rendering. They represent a cross-section of the features provided by various drivers. Setting them should \fBnot\fR break anything, but may not have an effect if the driver doesn't understand the option. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Graphics::Primitive::Font; \& \& my $font = Graphics::Primitive::Font\->new({ \& family => \*(AqArial\*(Aq, \& size => 12, \& slant => \*(Aqnormal\*(Aq \& }); .Ve .SH "METHODS" .IX Header "METHODS" .SS "Constructor" .IX Subsection "Constructor" .SH "Attributes" .IX Header "Attributes" .SS "antialias_modes" .IX Subsection "antialias_modes" Set the antialiasing mode for this font. Possible values are default, none, gray and subpixel. .SS "family" .IX Subsection "family" Set this font's family. .SS "hint_metrics" .IX Subsection "hint_metrics" Controls whether to hint font metrics. Hinting means quantizing them so that they are integer values in device space. This improves the consistency of letter and line spacing, however it also means that text will be laid out differently at different zoom factors. May not be supported by all drivers. .SS "hint_style" .IX Subsection "hint_style" Set the the type of hinting to do on font outlines. Hinting is the process of fitting outlines to the pixel grid in order to improve the appearance of the result. Since hinting outlines involves distorting them, it also reduces the faithfulness to the original outline shapes. Not all of the outline hinting styles are supported by all drivers. Options are default, none, slight, medium and full. .SS "size" .IX Subsection "size" Set/Get the size of this font. .SS "slant" .IX Subsection "slant" Set/Get the slant of this font. Valid values are normal, italic and oblique. .SS "subpixel_order" .IX Subsection "subpixel_order" Set the order of color elements within each pixel on the display device when rendering with subpixel antialiasing. Value values are default, rgb, bgr, vrgb and vbgr. .SS "variant" .IX Subsection "variant" Set/Get the variant of this font. Valid values are normal or small-caps. .SS "weight" .IX Subsection "weight" Set/Get the weight of this font. Value valies are normal and bold. .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" Creates a new Graphics::Primitive::Font. .SS "derive" .IX Subsection "derive" Clone this font but change one or more of it's attributes by passing in a hashref of options: .PP .Vb 1 \& my $new = $font\->derive({ attr => $newvalue }); .Ve .PP The returned font will be identical to the cloned one, save the attributes specified. .SH "AUTHOR" .IX Header "AUTHOR" Cory Watson, \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2008\-2010 by Cory G Watson. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.