1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-09 07:13:43 -05:00

Support SGR 9 for strikethrough effect on text.

This is mostly easy: it's just like drawing an underline, except that
you put it at a different height in the character cell. The only
question is _where_ in the character cell.

Pango, and Windows GetOutlineTextMetrics, will tell you exactly where
the font wants to have it. Following xterm, I fall back to 3/8 of the
font's ascent (above the baseline) if either of those is unavailable.
This commit is contained in:
Simon Tatham
2020-08-13 21:08:53 +01:00
parent 334d87251e
commit 06a8d11964
6 changed files with 52 additions and 15 deletions

View File

@ -67,7 +67,7 @@ typedef struct unifont {
/*
* Font dimensions needed by clients.
*/
int width, height, ascent, descent;
int width, height, ascent, descent, strikethrough_y;
/*
* Indicates whether this font is capable of handling all glyphs