}
+void RrFontDescriptionFromString(RrFont *font, gchar *description)
+{
+ PangoFontDescription *desc;
+ desc = pango_font_description_from_string(description);
+ pango_font_description_merge(font->font_desc, desc, TRUE);
+ pango_font_description_free(desc);
+ pango_layout_set_font_description(font->layout, font->font_desc);
+}
+
RrFont *RrFontOpen(const RrInstance *inst, const gchar *name, gint size,
RrFontWeight weight, RrFontSlant slant)
{
gboolean flow, gint maxwidth);
gint RrFontHeight (const RrFont *f, gint shadow_offset_y);
gint RrFontMaxCharWidth (const RrFont *f);
+/*! Select a font from a pango description string */
+void RrFontDescriptionFromString(RrFont *font, gchar *description);
/* Paint into the appearance. The old pixmap is returned (if there was one). It
is the responsibility of the caller to call XFreePixmap on the return when
*font = RrFontOpen(ob_rr_inst, name, size, weight, slant);
g_free(name);
+
+ if ((fnode = obt_xml_find_node(n->children, "description"))) {
+ gchar *s = obt_xml_node_string(fnode);
+ RrFontDescriptionFromString(*font, s);
+ g_free(s);
+ }
+
next_font:
n = obt_xml_find_node(n->next, "font");
}