Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

graphics::primitive::font(3pm) [debian man page]

Graphics::Primitive::Font(3pm)				User Contributed Perl Documentation			    Graphics::Primitive::Font(3pm)

NAME
Graphics::Primitive::Font - Text styling 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 not break anything, but may not have an effect if the driver doesn't understand the option. SYNOPSIS
use Graphics::Primitive::Font; my $font = Graphics::Primitive::Font->new({ family => 'Arial', size => 12, slant => 'normal' }); METHODS
Constructor Attributes antialias_modes Set the antialiasing mode for this font. Possible values are default, none, gray and subpixel. family Set this font's family. 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. 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. size Set/Get the size of this font. slant Set/Get the slant of this font. Valid values are normal, italic and oblique. 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. variant Set/Get the variant of this font. Valid values are normal or small-caps. weight Set/Get the weight of this font. Value valies are normal and bold. METHODS
new Creates a new Graphics::Primitive::Font. derive Clone this font but change one or more of it's attributes by passing in a hashref of options: my $new = $font->derive({ attr => $newvalue }); The returned font will be identical to the cloned one, save the attributes specified. AUTHOR
Cory Watson, "<gphat@cpan.org>" COPYRIGHT &; LICENSE Copyright 2008-2010 by Cory G Watson. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.3 2010-08-21 Graphics::Primitive::Font(3pm)

Check Out this Related Man Page

doc::lua-oocairo-fontopt(3)				       Lua OO Cairo binding				       doc::lua-oocairo-fontopt(3)

Name
       lua-oocairo-fontopt - options controlling text rendering

Introduction
       A font options object contains options that tell Cairo how to render text on surfaces.  They can be created with the "font_options_create"
       function in the main oocairo module (see lua-oocairo(3)), and retrieved from scaled fonts or context objects with "get_font_options"
       methods.

       Font options objects can be compared with the "==" operator.  Two different objects with the same options set will be considered equal.

Methods
       The following methods are available on font options objects:

       opt:copy ()
	   Returns a new font options object, with identical options to opt.  The two objects will be completely independent, so you can set them
	   to have different options.

       opt:get_antialias ()
	   Get the current antialiasing mode, which will be one of the strings accepted by the "opt:set_antialias()" method.

       opt:get_hint_metrics ()
	   Returns the current hint metrics option, which will be one of the same strings accepted by the "opt:set_hint_metrics()" method.

       opt:get_hint_style ()
	   Get the kind of font hinting done when rendering text.  Returns one of the strings accepted by the "opt:set_hint_style()" method.

       opt:get_subpixel_order ()
	   Returns the current ordering of colour components in pixels used for subpixel rendering, which will be one of the same strings accepted
	   by the "opt:set_subpixel_order()" method.

       opt:hash ()
	   Return a number which can be used as a hash key identifying the particular options in opt.  That is, if you wanted to cache fonts
	   according to the options set on them, you could store them in a table with this hash value as the key.  Two font options objects with
	   the same options will have the same hash value.

       opt:merge (srcopt)
	   Add any options which are set to a non-default value in srcopt to opt if that still has the default value from them.  The options in
	   srcopt will be unchanged.  Nothing is returned.

       opt:set_antialias (antialiastype)
	   Set the antialiasing mode used for drawing.	The argument must be a string or boolean value accepted by the "set_antialias" method on
	   context objects (see lua-oocairo-context(3)).

       opt:set_hint_metrics (hintmetrics)
	   Set the kind of hinting to be applied to the metrics, as opposed to outlines, of the glyphs in a font.  The hintmetrics value must be
	   one of the following strings:

	   default
	   off
	   on
       opt:set_hint_style (hintstyle)
	   Set the kind of font hinting done when rendering text.  The hintstyle value must be one of the following strings:

	   default
	   none
	   slight
	   medium
	   full
       opt:set_subpixel_order (order)
	   Used to inform Cairo of the arrangement of colour components in the pixels of a display device like a monitor.  Only applies if
	   subpixel antialiasing is used.  The order value must be one of the following strings:

	   default
	   rgb
	   bgr
	   vrgb
	   vbgr

	   The last two options refer to vertical arrangements of colours.

1.4								    2011-05-18					       doc::lua-oocairo-fontopt(3)
Man Page