X11Font(3pm)
π X11Font β Tk::Font π
okay bestie, welcome to X11Font(3pm) from the User Contributed Perl Documentation corner of the universe β¨ this is Tk::Font β a whole class for finding X Fonts ππ¦
πΈ NAME πΈ
Tk::Font β a class for finding X Fonts. that's it, that's the girl π
β¨ SYNOPSIS β¨
use Tk::X11Font;
$font = $widget->X11Font(foundry => 'adobe',
family => 'times',
point => 120
);
$font = $widget->X11Font('*-courier-medium-r-normal-*-*');
like, you can build a font from named fields, OR you can just throw a whole wildcard pattern at it and let it cook π₯ both are valid, both are iconic.
π DESCRIPTION π
This module can be use to interrogate the X server what fonts are available.
(no fr, that's the whole job β you go ask the X server "hey girl what fonts do you have" and it tells you π)
π METHODS π
π Foundry( [ $val ] )
π Family( [ $val ] )
π Weight( [ $val ] )
π Slant( [ $val ] )
π Swidth( [ $val ] )
π Adstyle( [ $val ] )
π Pixel( [ $val ] )
π Point( [ $val ] )
π Xres( [ $val ] )
π Yres( [ $val ] )
π Space( [ $val ] )
π Avgwidth( [ $val ] )
π Registry( [ $val ] )
π Encoding( [ $val ] )
Set the given field in the font name to $val if given and return the current or previous value.
so real talk: pass a value and it sets that field for you, then hands back the current-or-previous value. don't pass one? it just tells you what's there rn. no cap π«Ά
π¦ Name( [ $max ] )
In a list context it returns a list of all font names that match the fields given. It will return a maximum of $max names, or 128 if $max is not given.
In a scalar contex it returns the first matching name or undef
list context = the whole squad of matching names π― list context without $max = capped at 128, that's the limit bestie. scalar context = just the first one, or undef if there's literally nothing (and yes, "contex" is spelled that way in the original, we don't gatekeep π)
π Clone( [ key => value, [ ...]] )
Create a duplicate of the curent font object and modify the given fields
it's giving copy-paste but make it fashion π duplicate the font object, then tweak whatever fields you pass in.
π AUTHOR π
Graham Barr <Graham.Barr@tiuk.ti.com>
β HISTORY β
11-Jan-96β Initial version08-Nov-98β Renamed forTk800.012
πΈ COPYRIGHT πΈ
Copyright (c) 1995-1996 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, periodt π
cute little sign-off before you go: this wasperl v5.40.1, dated2025-04-13, and yes it's still servingX11Font(3pm)realness ππ¦β¨
π¦ where this page comes from
- debian trixie: perl-tk 1:804.036+dfsg1-5
- ubuntu questing: perl-tk 1:804.036+dfsg1-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms