FontChooser

interface FontChooser

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

In GTK, the main objects that implement this interface are class@Gtk.FontChooserWidget, class@Gtk.FontChooserDialog and class@Gtk.FontButton.

Skipped during bindings generation

  • method font: Property TypeInfo of getter and setter do not match

  • method font-desc: Property TypeInfo of getter and setter do not match

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The selected font features.

Link copied to clipboard
abstract val gtkFontChooserPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var language: String

The language for which the font features were selected.

Link copied to clipboard

The level of granularity to offer for selecting fonts.

Link copied to clipboard

The string with which to preview the font.

Link copied to clipboard

Whether to show an entry to change the preview text.

Functions

Link copied to clipboard
open fun connectFontActivated(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (fontname: String) -> Unit): <Error class: unknown class>

Emitted when a font is activated.

Link copied to clipboard
open fun getFont(): String?

Gets the currently-selected font name.

Link copied to clipboard
open fun getFontDesc(): <Error class: unknown class>?

Gets the currently-selected font.

Link copied to clipboard
open fun getFontFace(): <Error class: unknown class>?

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

Link copied to clipboard
open fun getFontFamily(): <Error class: unknown class>?

Gets the PangoFontFamily representing the selected font family.

Link copied to clipboard

Gets the currently-selected font features.

Link copied to clipboard
open fun getFontMap_(): <Error class: unknown class>?

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

Link copied to clipboard
open fun getFontSize(): Int

The selected font size.

Link copied to clipboard
open fun getLanguage(): String

Gets the language that is used for font features.

Link copied to clipboard

Returns the current level of granularity for selecting fonts.

Link copied to clipboard

Gets the text displayed in the preview area.

Link copied to clipboard

Returns whether the preview entry is shown or not.

Link copied to clipboard
open fun setFilterFunc(filter: FontFilterFunc)

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

Link copied to clipboard
open fun setFont(fontname: String)

Sets the currently-selected font.

Link copied to clipboard
open fun setFontDesc(fontDesc: <Error class: unknown class>)

Sets the currently-selected font from @font_desc.

Link copied to clipboard
open fun setFontMap_(fontmap: <Error class: unknown class>? = null)

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

Link copied to clipboard
open fun setLanguage(language: String)

Sets the language to use for font features.

Link copied to clipboard
open fun setLevel(level: FontChooserLevel)

Sets the desired level of granularity for selecting fonts.

Link copied to clipboard
open fun setPreviewText(text: String)

Sets the text displayed in the preview area.

Link copied to clipboard
open fun setShowPreviewEntry(showPreviewEntry: Boolean)

Shows or hides the editable preview entry.