Upstream update 2aefa348baf4b702fdce98eb105bcba175d8283f

Author: Zacchary Dempsey-Plante <zacc@ztdp.ca>
    Date:   Sun Mar 13 10:44:08 2022 +0100

    make underlines and strikethroughs respect `chscale`
This commit is contained in:
Ashish Kumar Yadav 2022-03-23 02:12:37 +05:30
parent 3df2c4893e
commit 1154978c55
1 changed files with 2 additions and 2 deletions

4
st/x.c
View File

@ -1505,12 +1505,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);
}