gtk.font_chooser

Module for [FontChooser] interface

Types 2

interfaceFontChooser

#GtkFontChooser is an interface that can be implemented by widgets displaying the list of fonts. In GTK+, the main objects that implement this interface are #GtkFontChooserWidget, #GtkFontChooserDialog and #GtkFontButton. The GtkFontChooser interface has been introducted in GTK+ 3.2.

Methods
string font() @propertyGet `font` property. Returns: The font description as a string, e.g. "Sans Italic 12".
void font(string propval) @propertySet `font` property. Params: propval = The font description as a string, e.g. "Sans Italic 12".
pango.font_description.FontDescription fontDesc() @propertyGet `fontDesc` property. Returns: The font description as a #PangoFontDescription.
void fontDesc(pango.font_description.FontDescription propval) @propertySet `fontDesc` property. Params: propval = The font description as a #PangoFontDescription.
string fontFeatures() @propertyGet `fontFeatures` property. Returns: The selected font features, in a format that is compatible with CSS and with Pango attributes.
string language() @propertyGet `language` property. Returns: The language for which the #GtkFontChooser:font-features were selected, in a format that is compatible with CSS and with Pango attributes.
void language(string propval) @propertySet `language` property. Params: propval = The language for which the #GtkFontChooser:font-features were selected, in a format that is compatible with CSS and with Pango attributes.
gtk.types.FontChooserLevel level() @propertyGet `level` property. Returns: The level of granularity to offer for selecting fonts.
void level(gtk.types.FontChooserLevel propval) @propertySet `level` property. Params: propval = The level of granularity to offer for selecting fonts.
string previewText() @propertyGet `previewText` property. Returns: The string with which to preview the font.
void previewText(string propval) @propertySet `previewText` property. Params: propval = The string with which to preview the font.
bool showPreviewEntry() @propertyGet `showPreviewEntry` property. Returns: Whether to show an entry to change the preview text.
void showPreviewEntry(bool propval) @propertySet `showPreviewEntry` property. Params: propval = Whether to show an entry to change the preview text.
string getFont()Gets the currently-selected font name.
pango.font_description.FontDescription getFontDesc()Gets the currently-selected font.
pango.font_face.FontFace getFontFace()Gets the #PangoFontFace representing the selected font group details (i.e. family, slant, weight, width, etc).
pango.font_family.FontFamily getFontFamily()Gets the #PangoFontFamily representing the selected font family. Font families are a collection of font faces.
string getFontFeatures()Gets the currently-selected font features. Returns: the currently selected font features
pango.font_map.FontMap getFontMap()Gets the custom font map of this font chooser widget, or null if it does not have one. Returns: a #PangoFontMap, or null
int getFontSize()The selected font size. Returns: A n integer representing the selected font size, or -1 if no font size is selected.
string getLanguage()Gets the language that is used for font features. Returns: the currently selected language
gtk.types.FontChooserLevel getLevel()Returns the current level of granularity for selecting fonts. Returns: the current granularity level
string getPreviewText()Gets the text displayed in the preview area. Returns: the text displayed in the preview area
bool getShowPreviewEntry()Returns whether the preview entry is shown or not. Returns: true if the preview entry is shown or false if it is hidden.
void setFilterFunc(gtk.types.FontFilterFunc filter = null)Adds a filter function that decides which fonts to display in the font chooser.
void setFont(string fontname)Sets the currently-selected font.
void setFontDesc(pango.font_description.FontDescription fontDesc)Sets the currently-selected font from font_desc.
void setFontMap(pango.font_map.FontMap fontmap = null)Sets a custom font map to use for this font chooser widget. A custom font map can be used to present application-specific fonts instead of or in addition to the normal system fonts.
void setLanguage(string language)Sets the language to use for font features.
void setLevel(gtk.types.FontChooserLevel level)Sets the desired level of granularity for selecting fonts.
void setPreviewText(string text)Sets the text displayed in the preview area. The text is used to show how the selected font looks.
void setShowPreviewEntry(bool showPreviewEntry)Shows or hides the editable preview entry.
gulong connectFontActivated(T)(T callback, Flag!"After" after = No.After)Connect to `FontActivated` signal.
Methods
T font(string propval)Set `font` property. Params: propval = The font description as a string, e.g. "Sans Italic 12". Returns: Builder instance for fluent chaining
T fontDesc(pango.font_description.FontDescription propval)Set `fontDesc` property. Params: propval = The font description as a #PangoFontDescription. Returns: Builder instance for fluent chaining
T language(string propval)Set `language` property. Params: propval = The language for which the #GtkFontChooser:font-features were selected, in a format that is compatible with CSS and with Pango attributes. Returns: Builde...
T level(gtk.types.FontChooserLevel propval)Set `level` property. Params: propval = The level of granularity to offer for selecting fonts. Returns: Builder instance for fluent chaining
T previewText(string propval)Set `previewText` property. Params: propval = The string with which to preview the font. Returns: Builder instance for fluent chaining
T showPreviewEntry(bool propval)Set `showPreviewEntry` property. Params: propval = Whether to show an entry to change the preview text. Returns: Builder instance for fluent chaining