st

simple terminal

git clone https://9o.is/git/st.git

commit cb3ff7d3e84553dfa481c34507e1d0d26f1a2663
parent 73b1e777a70c0820cc70ed3fbd8cd15ca4e528b4
Author: Anders Eurenius <aes@spotify.com>
Date:   Sat, 21 Jun 2014 20:32:34 +0200

Render struck-out attribute

Implement crossed-out text with an XftDrawRect call, similar to how
underline is implemented. The line is drawn at 2/3 of the font ascent,
which seems to work nicely in practice.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>

Diffstat:
Mst.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/st.c b/st.c @@ -3383,6 +3383,11 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { width, 1); } + if(base.mode & ATTR_STRUCK) { + XftDrawRect(xw.draw, fg, winx, winy + 2 * font->ascent / 3, + width, 1); + } + /* Reset clip to none. */ XftDrawSetClip(xw.draw, 0); }