+ config_title_layout = obt_parse_node_string(n);
+
+ /* replace duplicates with spaces */
+ for (c = config_title_layout; *c != '\0'; ++c)
+ for (d = c+1; *d != '\0'; ++d)
+ if (*c == *d) *d = ' ';
+ }
+ if ((n = obt_parse_find_node(node, "keepBorder")))
+ config_theme_keepborder = obt_parse_node_bool(n);
+ if ((n = obt_parse_find_node(node, "animateIconify")))
+ config_animate_iconify = obt_parse_node_bool(n);
+
+ n = obt_parse_find_node(node, "font");
+ while (n) {
+ xmlNodePtr fnode;
+ RrFont **font;
+ gchar *name = g_strdup(RrDefaultFontFamily);
+ gint size = RrDefaultFontSize;
+ RrFontWeight weight = RrDefaultFontWeight;
+ RrFontSlant slant = RrDefaultFontSlant;
+
+ if (obt_parse_attr_contains(n, "place", "ActiveWindow"))
+ font = &config_font_activewindow;
+ else if (obt_parse_attr_contains(n, "place", "InactiveWindow"))
+ font = &config_font_inactivewindow;
+ else if (obt_parse_attr_contains(n, "place", "MenuHeader"))
+ font = &config_font_menutitle;
+ else if (obt_parse_attr_contains(n, "place", "MenuItem"))
+ font = &config_font_menuitem;
+ else if (obt_parse_attr_contains(n, "place", "OnScreenDisplay"))
+ font = &config_font_osd;
+ else
+ goto next_font;
+
+ if ((fnode = obt_parse_find_node(n->children, "name"))) {
+ g_free(name);
+ name = obt_parse_node_string(fnode);
+ }
+ if ((fnode = obt_parse_find_node(n->children, "size"))) {
+ int s = obt_parse_node_int(fnode);
+ if (s > 0) size = s;
+ }
+ if ((fnode = obt_parse_find_node(n->children, "weight"))) {
+ gchar *w = obt_parse_node_string(fnode);
+ if (!g_ascii_strcasecmp(w, "Bold"))
+ weight = RR_FONTWEIGHT_BOLD;
+ g_free(w);
+ }
+ if ((fnode = obt_parse_find_node(n->children, "slant"))) {
+ gchar *s = obt_parse_node_string(fnode);
+ if (!g_ascii_strcasecmp(s, "Italic"))
+ slant = RR_FONTSLANT_ITALIC;
+ if (!g_ascii_strcasecmp(s, "Oblique"))
+ slant = RR_FONTSLANT_OBLIQUE;
+ g_free(s);
+ }
+
+ *font = RrFontOpen(ob_rr_inst, name, size, weight, slant);
+ g_free(name);
+ next_font:
+ n = obt_parse_find_node(n->next, "font");