GimpText-xlfd

GimpText-xlfd

Synopsis

gchar *             gimp_text_font_name_from_xlfd       (const gchar *xlfd);
gboolean            gimp_text_font_size_from_xlfd       (const gchar *xlfd,
                                                         gdouble *size,
                                                         GimpUnit *size_unit);
void                gimp_text_set_font_from_xlfd        (GimpText *text,
                                                         const gchar *xlfd);

Description

Details

gimp_text_font_name_from_xlfd ()

gchar *             gimp_text_font_name_from_xlfd       (const gchar *xlfd);

Attempts to extract a meaningful font name from the "family", "weight", "slant" and "stretch" fields of an X Logical Font Description.

xlfd :

X Logical Font Description

Returns :

a newly allocated string.

gimp_text_font_size_from_xlfd ()

gboolean            gimp_text_font_size_from_xlfd       (const gchar *xlfd,
                                                         gdouble *size,
                                                         GimpUnit *size_unit);

Attempts to extract the font size from an X Logical Font Description.

xlfd :

X Logical Font Description

size :

return location for the font size

size_unit :

return location for the font size unit

Returns :

TRUE on success, FALSE otherwise.

gimp_text_set_font_from_xlfd ()

void                gimp_text_set_font_from_xlfd        (GimpText *text,
                                                         const gchar *xlfd);

Attempts to extract font name and font size from xlfd and sets them on the GimpText object.

text :

a GimpText object

xlfd :

X Logical Font Description