ST patched with stuff from https://st.suckless.org/patches/ to work as a lighter alternative to XTerm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
482 B

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);