- /* load the font, not from the theme file tho, its in themerc_font */
- s_winfont_shadow = 1; /* XXX read from themrc */
- s_winfont_shadow_offset = 1; /* XXX read from themerc */
- s_winfont = font_open(themerc_font);
+ /* load the font, not from the theme file tho, its in the config */
+
+ if (!config_get("font.shadow", Config_Bool, &shadow)) {
+ shadow.bool = TRUE; /* default */
+ config_set("font.shadow", Config_Bool, shadow);
+ }
+ s_winfont_shadow = shadow.bool;
+ if (!config_get("font.shadow.offset", Config_Integer, &offset) ||
+ offset.integer < 0 || offset.integer >= 10) {
+ offset.integer = 1; /* default */
+ config_set("font.shadow.offset", Config_Integer, offset);
+ }
+ s_winfont_shadow_offset = offset.integer;
+ if (!config_get("font", Config_String, &font)) {
+ font.string = DEFAULT_FONT;
+ config_set("font", Config_String, font);
+ }
+ s_winfont = font_open(font.string);