tUse XftFontMatch in place of FcFontMatch. - st - [fork] customized build of st… | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 528241aa3835e2f1f052abeeaf891737712955a0 | |
parent 60aeb37edb8c5280d31b6b3c801d09c7a5fdca76 | |
Author: Christoph Lohmann <[email protected]> | |
Date: Fri, 3 Jun 2016 15:02:32 +0200 | |
Use XftFontMatch in place of FcFontMatch. | |
git am -s didn't like your patch: | |
From: Mark Edgar <[email protected]> | |
XftFontMatch calls XftDefaultSubstitute which configures various match | |
properties according to the user's configured Xft defaults (xrdb) as well as | |
according to the current display and screen. Most importantly, the screen DPI | |
is computed [1]. Without this, st uses a "default" DPI of 75 [2]. | |
t[1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftdpy.c?id=libXft-… | |
t[2]: https://cgit.freedesktop.org/fontconfig/tree/src/fcdefault.c?id=2.11.1#n2… | |
Diffstat: | |
M st.c | 5 +---- | |
1 file changed, 1 insertion(+), 4 deletions(-) | |
--- | |
diff --git a/st.c b/st.c | |
t@@ -3279,7 +3279,7 @@ xloadfont(Font *f, FcPattern *pattern) | |
FcResult result; | |
XGlyphInfo extents; | |
- match = FcFontMatch(NULL, pattern, &result); | |
+ match = XftFontMatch(xw.dpy, xw.scr, pattern, &result); | |
if (!match) | |
return 1; | |
t@@ -3345,9 +3345,6 @@ xloadfonts(char *fontstr, double fontsize) | |
defaultfontsize = usedfontsize; | |
} | |
- FcConfigSubstitute(0, pattern, FcMatchPattern); | |
- FcDefaultSubstitute(pattern); | |
- | |
if (xloadfont(&dc.font, pattern)) | |
die("st: can't open font %s\n", fontstr); | |