Gnome2::FontPicker(3)
β¨ Gnome2::FontPicker β¨
okay bestie, so this is Gnome2::FontPicker β the perl wrapper for GnomeFontPicker, and it's literally the cutest little button that opens a font-choosing dialog. she's giving main character energy in your GTK app π
πΈ HIERARCHY πΈ
the family tree, no cap β she did NOT come from nowhere:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Bin
+----Gtk2::Button
+----Gnome2::FontPicker
so yeah, she IS a Gtk2::Button. a button with a glow-up π
π¦ INTERFACES π¦
the vibes she carries with her:
Glib::Object::_Unregistered::AtkImplementorIfaceGtk2::BuildableGtk2::Activatable
π METHODS π
widget = Gnome2::FontPicker->new
make a brand new font picker, fresh out the box β¨
$gfp->fi_set_show_size ($show_size)
$show_size(boolean)
sets whether size shows up in font info mode.
$gfp->fi_set_use_font_in_label ($use_font_in_label, $size)
$use_font_in_label(boolean)$size(integer)
controls whether the label in font info mode uses the actual font, and at what size, periodt.
string = $gfp->get_font_name
get the name of the currently selected font, iconic π«Ά
boolean = $gfp->set_font_name ($fontname)
$fontname(string)
set the font by name. returns a boolean.
fontpickermode = $gfp->get_mode
read the mode she's operating in.
$gfp->set_mode ($mode)
$mode(Gnome2::FontPickerMode)
change the mode of operation.
string = $gfp->get_preview_text
grab the preview text currently showing in the dialog.
$gfp->set_preview_text ($text)
$text(string)
set that preview text. make it cute if u want πΈ
string = $gfp->get_title
get the dialog title.
$gfp->set_title ($title)
$title(string)
set the dialog title. name her something iconic.
widget = $gfp->uw_get_widget
get the user widget.
$gfp->uw_set_widget ($widget)
$widget(Gtk2::Widget)
set the user widget. user-widget mode only, iykyk.
π PROPERTIES π
the whole vibe check, property by property:
'font'(gpointer : default 0 : readable) β the selectedGtkFont. read-only bestie, don't try it.'font-name'(string : default"sans 12": readable / writable) β name of the selected font.'label-font-size'(integer : default14: readable / writable) β font size for the label in font info mode.'mode'(Gnome2::FontPickerMode : default"pixmap": readable / writable) β the mode of operation of the font picker.'preview-text'(string : default"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz": readable / writable) β preview text shown in the dialog.'show-size'(boolean : defaulttrue: readable / writable) β show size in font info mode.'title'(string : default"Pick a Font": readable / writable) β the title of the selection dialog box.'use-font-in-label'(boolean : defaultfalse: readable / writable) β use font in the label in font info mode.
π SIGNALS π
font-set(Gnome2::FontPicker, string)
fires when a font gets set. that's the moment. obsessed. π
β ENUMS AND FLAGS β
enum Gnome2::FontPickerMode
the four modes, each one a different era:
'pixmap'/GNOME_FONT_PICKER_MODE_PIXMAP'font-info'/GNOME_FONT_PICKER_MODE_FONT_INFO'user-widget'/GNOME_FONT_PICKER_MODE_USER_WIDGET'unknown'/GNOME_FONT_PICKER_MODE_UNKNOWN
π SEE ALSO π
go read these too, fr fr:
Gnome2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Button
π COPYRIGHT π
Copyright (C) 2003-2004 by the gtk2-perl team.
This software is licensed under the LGPL. See Gnome2 for a full notice.
and that's the whole page bestie π this was perl v5.42.0, dated 2025-07-25, and it's Gnome2::FontPicker(3) β slay, go pick a font, ily π«Άβ¨
π¦ where this page comes from
- fedora 43: perl-Gnome2 1.048-18.fc43 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms