Gtk2::F...election(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’… 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::AtkImplementorIface
  • Gtk2::Buildable
  • Gtk2::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:

  • Gtk2
  • Glib::Object
  • Glib::InitiallyUnowned
  • Gtk2::Object
  • Gtk2::Widget
  • Gtk2::Container
  • Gtk2::Box
  • Gtk2::VBox

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