+ g_free(str);
+ }
+
+ font_str = "arial-10:bold";
+
+ theme_mtitlefont_shadow = FALSE;
+ if (read_string(db, "menu.title.xft.flags", &str)) {
+ if (g_strrstr(str, "shadow"))
+ theme_mtitlefont_shadow = TRUE;
+ g_free(str);
+ }
+
+ if (!read_int(db, "menu.title.xft.shadow.offset",
+ &theme_mtitlefont_shadow_offset))
+ theme_mtitlefont_shadow_offset = 1;
+ if (!read_int(db, "menu.title.xft.shadow.tint",
+ &theme_mtitlefont_shadow_tint) ||
+ theme_mtitlefont_shadow_tint < 100 ||
+ theme_mtitlefont_shadow_tint > 100)
+ theme_mtitlefont_shadow_tint = 25;
+
+ theme_mtitlefont = font_open(font_str);
+ theme_mtitlefont_height = font_height(theme_mtitlefont,
+ theme_mtitlefont_shadow,
+ theme_mtitlefont_shadow_offset);
+
+ mtitlejust = Justify_Left;
+ if (read_string(db, "menu.title.justify", &str)) {
+ if (!g_ascii_strcasecmp(str, "right"))
+ mtitlejust = Justify_Right;
+ else if (!g_ascii_strcasecmp(str, "center"))
+ mtitlejust = Justify_Center;
+ g_free(str);
+ }
+
+ font_str = "arial-8";
+
+ theme_mfont_shadow = FALSE;
+ if (read_string(db, "menu.frame.xft.flags", &str)) {
+ if (g_strrstr(str, "shadow"))
+ theme_mfont_shadow = TRUE;
+ g_free(str);
+ }
+
+ if (!read_int(db, "menu.frame.xft.shadow.offset",
+ &theme_mfont_shadow_offset))
+ theme_mfont_shadow_offset = 1;
+ if (!read_int(db, "menu.frame.xft.shadow.tint",
+ &theme_mfont_shadow_tint) ||
+ theme_mfont_shadow_tint < 100 ||
+ theme_mfont_shadow_tint > 100)
+ theme_mfont_shadow_tint = 25;
+
+ theme_mfont = font_open(font_str);
+ theme_mfont_height = font_height(theme_mfont, theme_mfont_shadow,
+ theme_mfont_shadow_offset);
+
+ mjust = Justify_Left;
+ if (read_string(db, "menu.frame.justify", &str)) {
+ if (!g_ascii_strcasecmp(str, "right"))
+ mjust = Justify_Right;
+ else if (!g_ascii_strcasecmp(str, "center"))
+ mjust = Justify_Center;
+ g_free(str);