Gtk2::F...election(3)
π Gtk2::FontSelection β NAME
okay so bestie, welcome to Gtk2::FontSelection π β it's the Perl wrapper for GtkFontSelection, aka the little widget that lets your user pick a font and makes them feel like a typography main character. We're in the Gtk2 manual (User Contributed Perl Documentation, no less), so pull up a chair π
π¦ HIERARCHY
the ancestry tree, and yes it's giving royal family π
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Box
+----Gtk2::VBox
+----Gtk2::FontSelection
six generations deep and every single one of them ate π
β¨ INTERFACES
the vibes it implements, no cap:
Glib::Object::_Unregistered::AtkImplementorIfaceGtk2::BuildableGtk2::Orientable
πΈ METHODS
π widget = Gtk2::FontSelection->new
make a whole new font selection widget. fresh out the box, iconic π«Ά
π fontface = $fontsel->get_face
grab the face. Since: gtk+ 2.14
π widget = $fontsel->get_face_list
hand you the face list widget. Since: gtk+ 2.14
π fontfamily = $fontsel->get_family
get the family. Since: gtk+ 2.14
π widget = $fontsel->get_family_list
get the family list widget. Since: gtk+ 2.14
π font = $fontsel->get_font
the current font, right there π
π string = $fontsel->get_font_name
the font's name as a string β¨
π boolean = $fontsel->set_font_name ($fontname)
set that name, get a boolean back:
$fontname(string)
π widget = $fontsel->get_preview_entry
the preview entry widget. Since: gtk+ 2.14
π string = $fontsel->get_preview_text
get the preview text, the lil sample string π
π $fontsel->set_preview_text ($text)
set the preview text:
$text(string)
π widget = $fontsel->get_size_entry
the size entry widget. Since: gtk+ 2.14
π integer = $fontsel->get_size
an integer size, bestie π’ Since: gtk+ 2.14
π widget = $fontsel->get_size_list
the size list widget. Since: gtk+ 2.14
π PROPERTIES
π 'font' (Gtk2::Gdk::Font : default undef : readable / private / static-nick / static-blurb)
The GdkFont that is currently selected π«
π 'font-name' (string : default "Sans 10" : readable / writable / private / static-nick / static-blurb)
The string that represents this font βοΈ default is literally "Sans 10", that's the blueprint
π 'preview-text' (string : default "abcdefghijk ABCDEFGHIJK" : readable / writable / private / static-nick / static-blurb)
The text to display in order to demonstrate the selected font π and the default is "abcdefghijk ABCDEFGHIJK", which honestly is a whole vibe
π SEE ALSO
go read these next, fr fr:
Gtk2Glib::ObjectGlib::InitiallyUnownedGtk2::ObjectGtk2::WidgetGtk2::ContainerGtk2::BoxGtk2::VBox
π COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
k that's the whole page, no notes, you're so welcome π«Ά
and that's a wrap on this little slice of perl v5.42.0, dated 2025-07-25 β Gtk2::F...election(3), signing off like the icon it is β¨π bye bestie!!
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms