Cory Watson > Graphics-Primitive-0.44 > Graphics::Primitive::Font

Download:
Graphics-Primitive-0.44.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source   Latest Release: Graphics-Primitive-0.46

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

new

Creates a new Graphics::Primitive::Font.

Instance Methods

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.

family

Set this font's family.

size

Set/Get the size of this font.

slant

Set/Get the slant of this font. Valid values are normal, italic and oblique.

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.

AUTHOR ^

Cory Watson, <gphat@cpan.org>

Infinity Interactive, http://www.iinteractive.com

BUGS ^

Please report any bugs or feature requests to bug-geometry-primitive at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Geometry-Primitive. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE ^

Copyright 2008 by Infinity Interactive, Inc.

http://www.iinteractive.com

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.