Text::...riptor(3pm)

πŸ“¦
version 0.045 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Text::Layout::FontDescriptor β€” it's the whole font description situation for Text::Layout, bestie. Like, it's the little card that says who this font is, what it's wearing, how big it's feeling today. πŸŽ€


✨ SYNOPSIS ✨

okay so real talk: you probs aren't gonna be making these yourself. Font descriptors are used internally by Text::Layout and Text::Layout::FontConfig. They're the backstage crew, not the main character (even though lowkey they carry the whole show). πŸ’…


🫢 METHODS 🫢

  • new( [ %atts ] ) β€” spins up a brand new FontDescriptor object. Huge. Iconic. Slay.

Here's the attribute menu, bestie:

  • family
  • style
  • weight β€” The Family, style, and weight of this font. These are mandatory, no cap. If you want the defaults, pass an empty string. That's the move. ⭐
  • size β€” Optional. It's the font size. That's it, that's the whole vibe.
  • font β€” The actual font data. The real deal. The font itself, in the flesh. πŸ¦‹
  • loader β€” A code reference. The code that actually creates/loads the font if it needs to. Loading will store the font data in the "font" property, so like, that's where it ends up. 🧚
  • 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. So it just kinda handles it for you. πŸ’–
  • get_family
  • get_style
  • get_weight β€” Accessors to the font family, style, and weight. They're Readonly, so don't even try it. πŸ™ˆ
  • set_size
  • get_size β€” Sets/gets the size property of the font. Classic setter/getter combo, we love to see it. ✨
  • set_direction
  • get_direction β€” Sets/gets the direction property of the font. Another little duo, matching energy. πŸŽ€
  • to_string β€” Returns a Pango-style font string, like "Sans Italic 14". It's giving font. It's giving descriptor. It's giving string. πŸ”₯

🌈 SEE ALSO 🌈

Text::Layout::FontConfig, Text::Layout. Go read those too, fr fr. πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Johan Vromans, "<JV at CPAN dot org>". Legend behaviour. πŸ’œ


🌸 SUPPORT 🌸

This module is part of Text::Layout. Periodt.

Development takes place on GitHub: <https://github.com/sciurius/perl-Text-Layout>. Go lurk, go contribute. πŸ¦‹

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. Not me gatekeeping bug reports β€” we want them. 😭


πŸ’€ LICENSE πŸ’€

See Text::Layout.


k that's the whole page bestie, go forth and describe fonts πŸ’–

perl v5.40.1, dated 2025-08-15 β€” yeah that's the source/version energy, mwah, take care of yourself, hydrate, and remember: the font descriptor is always the main character even when nobody's looking. πŸ’…βœ¨

πŸ“¦ where this page comes from