NAME

Text::Layout::FontDescriptor - font description for Text::Layout

SYNOPSIS

Font descriptors are used internally by Text::Layout and Text::Layout::FontConfig.

METHODS

new( [ %atts ] )

Creates a new FontDescriptor object.

Attributes:

family
style
weight

The Family, style, and weight of this font. There are mandatory. For defaults, use an empty string.

size

Optional, font size.

font

The actual font data.

loader

A code reference to call to actually create/load the font if necessary.

Loading will store the font data in the font property.

get_font

Returns the actual font data for the font this descriptor describes.

If necessary, the backend will be called to create/load the font.

get_family
get_style
get_weight

Accessors to the font family, style, and weight.

Readonly.

set_size
get_size

Sets/gets the size property of the font.

set_direction
get_direction

Sets/gets the direction property of the font.

to_string

Returns a Pango-style font string, Sans Italic 14.

SEE ALSO

Text::Layout::FontConfig, Text::Layout.

AUTHOR

Johan Vromans, <JV at CPAN dot org>

SUPPORT

This module is part of Text::Layout.

Development takes place on GitHub: https://github.com/sciurius/perl-Text-Layout.

You can find documentation for this module with the perldoc command.

perldoc Text::Layout::FontDescriptor

Please report any bugs or feature requests using the issue tracker for Text::Layout on GitHub.

LICENSE

See Text::Layout.