[hackers] [st] make underlines and strikethroughs respect `chscale` || Zacchary Dempsey-Plante
commit 2aefa348baf4b702fdce98eb105bcba175d8283f
Author: Zacchary Dempsey-Plante <zacc_AT_ztdp.ca>
AuthorDate: Sun Mar 13 10:44:08 2022 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Sun Mar 13 10:45:34 2022 +0100
make underlines and strikethroughs respect `chscale`
diff --git a/x.c b/x.c
index cd96575..2a3bd38 100644
--- a/x.c
+++ b/x.c
_AT_@ -1493,12 +1493,12 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
/* Render underline and strikethrough. */
if (base.mode & ATTR_UNDERLINE) {
- XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1,
+ XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent * chscale + 1,
width, 1);
}
if (base.mode & ATTR_STRUCK) {
- XftDrawRect(xw.draw, fg, winx, winy + 2 * dc.font.ascent / 3,
+ XftDrawRect(xw.draw, fg, winx, winy + 2 * dc.font.ascent * chscale / 3,
width, 1);
}
Received on Sun Mar 13 2022 - 10:45:57 CET
This archive was generated by hypermail 2.3.0
: Sun Mar 13 2022 - 10:48:36 CET