17 lines
482 B
Diff
17 lines
482 B
Diff
diff --git a/x.c b/x.c
|
|
index 2a3bd38..a36527b 100644
|
|
--- a/x.c
|
|
+++ b/x.c
|
|
@@ -985,6 +985,11 @@ xloadfonts(const char *fontstr, double fontsize)
|
|
{
|
|
FcPattern *pattern;
|
|
double fontval;
|
|
+ /* Remove xft: prefix to work interchangeably with xterm config */
|
|
+ const int fontstrlen = strlen(fontstr);
|
|
+ if (fontstrlen > 4 && (strncmp(fontstr, "xft:", 4) == 0)) {
|
|
+ fontstr = fontstr+4;
|
|
+ }
|
|
|
|
if (fontstr[0] == '-')
|
|
pattern = XftXlfdParse(fontstr, False, False);
|