all repos — st @ 528241aa3835e2f1f052abeeaf891737712955a0

st (suckless terminal) config

Use XftFontMatch in place of FcFontMatch.

git am -s didn't like your patch:

From: Mark Edgar <medgar123@gmail.com>

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].

[1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftdpy.c?id=libXft-2.3.2#n535
[2]: https://cgit.freedesktop.org/fontconfig/tree/src/fcdefault.c?id=2.11.1#n255
Christoph Lohmann 20h@r-36.net
commit

528241aa3835e2f1f052abeeaf891737712955a0

parent

60aeb37edb8c5280d31b6b3c801d09c7a5fdca76

1 files changed, 1 insertions(+), 4 deletions(-)

jump to
M st.cst.c

@@ -3279,7 +3279,7 @@ FcPattern *match;

FcResult result; XGlyphInfo extents; - match = FcFontMatch(NULL, pattern, &result); + match = XftFontMatch(xw.dpy, xw.scr, pattern, &result); if (!match) return 1;

@@ -3344,9 +3344,6 @@ usedfontsize = 12;

} defaultfontsize = usedfontsize; } - - FcConfigSubstitute(0, pattern, FcMatchPattern); - FcDefaultSubstitute(pattern); if (xloadfont(&dc.font, pattern)) die("st: can't open font %s\n", fontstr);