浏览代码

Make it possible to use the corefont font description too. It is not very

useful, but easy to implement.
Christoph Lohmann 12 年之前
父节点
当前提交
c631e9bb91
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      st.c

+ 6 - 1
st.c

@@ -2226,7 +2226,12 @@ xloadfonts(char *fontstr, int fontsize) {
 	FcResult result;
 	double fontval;
 
-	pattern = FcNameParse((FcChar8 *)fontstr);
+	if(fontstr[0] == '-') {
+		pattern = XftXlfdParse(fontstr, False, False);
+	} else {
+		pattern = FcNameParse((FcChar8 *)fontstr);
+	}
+
 	if(!pattern)
 		die("st: can't open font %s\n", fontstr);