GNU bug report logs -
#33648
25.2; feature request: configurable position of strike-through line
Previous Next
Full log
View this message in rfc822 format
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Mon, 31 Aug 2020 11:21:09 +0000
> Cc: 33648 <at> debbugs.gnu.org
>
> > When I use set-face-attribute to give some text a strike-through
> > attribute, I see that emacs behaves differently from other pieces of
> > software: Apparently, the line is drawn at the level of half the glyph's
> > height -- which causes the line to be just touching letters like "a",
> > "c", "e", ... and it isn't perceived as striking the text out (at least
> > not by me).
> >
> > In comparison, web browsers interpreting html strike tag make the
> > line at the level of half of the "small lowercase letters" -- basically
> > at the level of the line in lowercase "e". The same is done by Libre
> > Office ... and others.
Web browsers and the rest normally don't have to support display
elements of different height on the same screen line.
> > My suggestion is to make this configurable in some way. I'm not sure,
> > if it would be better to have a global option for all files, or
> > if "(set-face-attribute ... :strike-through" should accept more choices
> > to make each line configurable. (I personally would change all of my
> > striking lines, if possible.)
Patches to make the offset configurable via a Lisp variable are
welcome. (I'm not sure the result will be prettier, except in some
very special cases, but if someone wants to shoot themselves in the
foot, why not?)
> I'm have no idea how to fix it; the font code is pretty opaque to me.
The code to handle this is quite simple: search for strike_through_p
in xterm.c. (We have similar code in w32term.c and nsterm.m.)
> I mucked around a bit and came up with the below diff.
I found no diffs in your message.
This bug report was last modified 4 years and 347 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.