~petersanchez/st

92ade0bb8ba40d96d568abded4231f0ac5814e9e — Zacchary Dempsey-Plante 2 years ago 4be0d78
make underlines and strikethroughs respect `chscale`
1 files changed, 2 insertions(+), 2 deletions(-)

M x.c
M x.c => x.c +2 -2
@@ 1511,12 1511,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);
	}