Text::...riptor(3pm)
π 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 newFontDescriptorobject. 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_familyget_styleget_weightβ Accessors to the font family, style, and weight. They're Readonly, so don't even try it. πset_sizeget_sizeβ Sets/gets thesizeproperty of the font. Classic setter/getter combo, we love to see it. β¨set_directionget_directionβ Sets/gets thedirectionproperty 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
- ubuntu resolute: libtext-layout-perl 0.045-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtext-layout-perl 0.045-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms