aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-11-02 20:07:11 +0100
committerChristoph Lohmann <20h@r-36.net>2012-11-02 20:07:11 +0100
commitc631e9bb917ec268463b3f1f331b286c43a6bd0b (patch)
tree25318e8b5f03a4b6393e12b3a08d63928d9d715c
parent393825f9f8a23dfcdfda5220aa8029e9356fa15b (diff)
downloadst-c631e9bb917ec268463b3f1f331b286c43a6bd0b.tar.gz
Make it possible to use the corefont font description too. It is not very
useful, but easy to implement.
-rw-r--r--st.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/st.c b/st.c
index cdf1fdc..8e0df08 100644
--- a/st.c
+++ b/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);
remember that computers suck.