Method

GtkFontSelectionset_font_name

deprecated: 3.2 

Declaration [src]

gboolean
gtk_font_selection_set_font_name (
  GtkFontSelection* fontsel,
  const gchar* fontname
)

Description [src]

Sets the currently-selected font.

Note that the fontsel needs to know the screen in which it will appear for this to work; this can be guaranteed by simply making sure that the fontsel is inserted in a toplevel window before you call this function.

Deprecated since: 3.2

Use GtkFontChooser.

Parameters

fontname

Type: const gchar*

A font name like “Helvetica 12” or “Times Bold 18”.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.

Return value

Type: gboolean

TRUE if the font could be set successfully; FALSE if no such font exists or if the fontsel doesn’t belong to a particular screen yet.