make underlines and strikethroughs respect chscale
Ref. https://git.suckless.org/st/commit/2aefa348baf4b702fdce98eb105bcba175d8283f.html
This commit is contained in:
parent
289485bd50
commit
fb0b76b0ff
2 changed files with 6 additions and 7 deletions
11
x.c
11
x.c
|
|
@ -2012,9 +2012,8 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
|
|||
|
||||
// Underline Style
|
||||
if (base.ustyle != 3) {
|
||||
//XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1, width, 1);
|
||||
XFillRectangle(xw.dpy, XftDrawDrawable(xw.draw), ugc, winx,
|
||||
winy + dc.font.ascent + 1, width, wlw);
|
||||
winy + dc.font.ascent * chscale + 1, width, wlw);
|
||||
} else if (base.ustyle == 3) {
|
||||
int ww = win.cw;//width;
|
||||
int wh = dc.font.descent - wlw/2 - 1;//r.height/7;
|
||||
|
|
@ -2326,20 +2325,20 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
|
|||
|
||||
XFreeGC(xw.dpy, ugc);
|
||||
#elif VERTCENTER_PATCH
|
||||
XftDrawRect(xw.draw, fg, winx, winy + win.cyo + dc.font.ascent + 1,
|
||||
XftDrawRect(xw.draw, fg, winx, winy + win.cyo + dc.font.ascent * chscale + 1,
|
||||
width, 1);
|
||||
#else
|
||||
XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1,
|
||||
XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent * chscale + 1,
|
||||
width, 1);
|
||||
#endif // UNDERCURL_PATCH | VERTCENTER_PATCH
|
||||
}
|
||||
|
||||
if (base.mode & ATTR_STRUCK) {
|
||||
#if VERTCENTER_PATCH
|
||||
XftDrawRect(xw.draw, fg, winx, winy + win.cyo + 2 * dc.font.ascent / 3,
|
||||
XftDrawRect(xw.draw, fg, winx, winy + win.cyo + 2 * dc.font.ascent * chscale / 3,
|
||||
width, 1);
|
||||
#else
|
||||
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);
|
||||
#endif // VERTCENTER_PATCH
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue