:right-sidebar: True FontChooserWidget =================================================================== .. currentmodule:: gi.repository.Gtk .. deprecated:: 4.10 Direct use of ``GtkFontChooserWidget`` is deprecated. .. class:: FontChooserWidget(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Gtk.FontChooser` The ``GtkFontChooserWidget`` widget lets the user select a font. It is used in the ``GtkFontChooserDialog`` widget to provide a dialog for selecting fonts. To set the font which is initially selected, use :obj:`~gi.repository.Gtk.FontChooser.set_font` or :obj:`~gi.repository.Gtk.FontChooser.set_font_desc`. To get the selected font use :obj:`~gi.repository.Gtk.FontChooser.get_font` or :obj:`~gi.repository.Gtk.FontChooser.get_font_desc`. To change the text which is shown in the preview area, use :obj:`~gi.repository.Gtk.FontChooser.set_preview_text`. CSS nodes --------- ``GtkFontChooserWidget`` has a single CSS node with name fontchooser. Constructors ------------ .. rst-class:: interim-class .. class:: FontChooserWidget :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``GtkFontChooserWidget``. .. deprecated:: 4.10 Direct use of ``GtkFontChooserWidget`` is deprecated. Properties ---------- .. rst-class:: interim-class .. class:: FontChooserWidget :no-index: .. attribute:: props.tweak_action :type: ~gi.repository.Gio.Action A toggle action that can be used to switch to the tweak page of the font chooser widget, which lets the user tweak the OpenType features and variation axes of the selected font. The action will be enabled or disabled depending on whether the selected font has any features or axes.