Gtk.FontChooser
Description: Reference for Gtk.FontChooser

### Interface

# GtkFontChooser

deprecated: 4.10 since: 4.0

#### Description [src]

    interface Gtk.FontChooser : GObject.Object

`GtkFontChooser` is an interface that can be implemented by widgets for choosing fonts.

In GTK, the main objects that implement this interface are `GtkFontChooserWidget`, `GtkFontChooserDialog` and `GtkFontButton`.

Available since: 4.0

Deprecated since: 4.10

Use `GtkFontDialog` and `GtkFontDialogButton` instead.

#### Prerequisite

In order to implement FontChooser, your type must inherit from`GObject`.

#### Implementations

- GtkFontButton
- GtkFontChooserDialog
- GtkFontChooserWidget

#### Instance methods

###### gtk_font_chooser_get_font

Gets the currently-selected font name.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_get_font_desc

Gets the currently-selected font.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_get_font_face

Gets the `PangoFontFace` representing the selected font group details (i.e. family, slant, weight, width, etc).

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_get_font_family

Gets the `PangoFontFamily` representing the selected font family.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_get_font_features

Gets the currently-selected font features.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_get_font_map

Gets the custom font map of this font chooser widget, or `NULL` if it does not have one.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_get_font_size

The selected font size.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_get_language

Gets the language that is used for font features.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_get_level

Returns the current level of granularity for selecting fonts.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_get_preview_text

Gets the text displayed in the preview area.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_get_show_preview_entry

Returns whether the preview entry is shown or not.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_set_filter_func

Adds a filter function that decides which fonts to display in the font chooser.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_set_font

Sets the currently-selected font.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_set_font_desc

Sets the currently-selected font from `font_desc`.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_set_font_map

Sets a custom font map to use for this font chooser widget.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_set_language

Sets the language to use for font features.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_set_level

Sets the desired level of granularity for selecting fonts.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_set_preview_text

Sets the text displayed in the preview area.

deprecated: 4.10 since: 4.0

###### gtk_font_chooser_set_show_preview_entry

Shows or hides the editable preview entry.

deprecated: 4.10 since: 4.0

#### Properties

###### Gtk.FontChooser:font

The font description as a string, e.g. “Sans Italic 12”.

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser:font-desc

The font description as a `PangoFontDescription`.

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser:font-features

The selected font features.

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser:language

The language for which the font features were selected.

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser:level

The level of granularity to offer for selecting fonts.

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser:preview-text

The string with which to preview the font.

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser:show-preview-entry

Whether to show an entry to change the preview text.

deprecated: 4.10 since: 4.0

#### Signals

###### Gtk.FontChooser::font-activated

Emitted when a font is activated.

deprecated: 4.10 since: 4.0

#### Interface structure

    struct GtkFontChooserIface {
      GTypeInterface base_iface;
      PangoFontFamily* (* get_font_family) (
        GtkFontChooser* fontchooser
      );
      PangoFontFace* (* get_font_face) (
        GtkFontChooser* fontchooser
      );
      int (* get_font_size) (
        GtkFontChooser* fontchooser
      );
      void (* set_filter_func) (
        GtkFontChooser* fontchooser,
        GtkFontFilterFunc filter,
        gpointer user_data,
        GDestroyNotify destroy
      );
      void (* font_activated) (
        GtkFontChooser* chooser,
        const char* fontname
      );
      void (* set_font_map) (
        GtkFontChooser* fontchooser,
        PangoFontMap* fontmap
      );
      PangoFontMap* (* get_font_map) (
        GtkFontChooser* fontchooser
      );

    }

No description available.

###### Interface members

`base_iface` |
    GTypeInterface
| No description available.
`get_font_family` |
    PangoFontFamily* (* get_font_family) (
        GtkFontChooser* fontchooser
      )
| No description available.
`get_font_face` |
    PangoFontFace* (* get_font_face) (
        GtkFontChooser* fontchooser
      )
| No description available.
`get_font_size` |
    int (* get_font_size) (
        GtkFontChooser* fontchooser
      )
| No description available.
`set_filter_func` |
    void (* set_filter_func) (
        GtkFontChooser* fontchooser,
        GtkFontFilterFunc filter,
        gpointer user_data,
        GDestroyNotify destroy
      )
| No description available.
`font_activated` |
    void (* font_activated) (
        GtkFontChooser* chooser,
        const char* fontname
      )
| No description available.
`set_font_map` |
    void (* set_font_map) (
        GtkFontChooser* fontchooser,
        PangoFontMap* fontmap
      )
| No description available.
`get_font_map` |
    PangoFontMap* (* get_font_map) (
        GtkFontChooser* fontchooser
      )
| No description available.

#### Virtual methods

###### Gtk.FontChooser.font_activated

No description available.

since: 4.0

###### Gtk.FontChooser.get_font_face

Gets the `PangoFontFace` representing the selected font group details (i.e. family, slant, weight, width, etc).

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser.get_font_family

Gets the `PangoFontFamily` representing the selected font family.

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser.get_font_map

Gets the custom font map of this font chooser widget, or `NULL` if it does not have one.

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser.get_font_size

The selected font size.

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser.set_filter_func

Adds a filter function that decides which fonts to display in the font chooser.

deprecated: 4.10 since: 4.0

###### Gtk.FontChooser.set_font_map

Sets a custom font map to use for this font chooser widget.

deprecated: 4.10 since: 4.0