---
name: "Text::Layout::FontDescriptor"
section: "3pm"
platform: "linux"
package: "libtext-layout-perl"
version: "0.042-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Text::Layout::FontDescriptor"
---

# Text::Layout::FontDescriptor(3pm)

font description for Text::Layout

## 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.
