From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33648: 25.2; feature request: configurable position of strike-through line Date: Mon, 31 Aug 2020 17:37:13 +0300 Message-ID: <83wo1ex4o6.fsf@gnu.org> References: <2738781e-9dc8-01d1-1b88-13e9a684b53e@iuuk.mff.cuni.cz> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13117"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 33648@debbugs.gnu.org, samal@iuuk.mff.cuni.cz To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 31 16:38:17 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCkwp-0003GW-Sc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Aug 2020 16:38:15 +0200 Original-Received: from localhost ([::1]:42248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCkwo-0005ar-U9 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Aug 2020 10:38:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCkwc-0005ak-1q for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2020 10:38:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41741) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCkwb-00016F-P8 for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2020 10:38:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kCkwb-0000Lw-NH for bug-gnu-emacs@gnu.org; Mon, 31 Aug 2020 10:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Aug 2020 14:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33648 X-GNU-PR-Package: emacs Original-Received: via spool by 33648-submit@debbugs.gnu.org id=B33648.15988846561323 (code B ref 33648); Mon, 31 Aug 2020 14:38:01 +0000 Original-Received: (at 33648) by debbugs.gnu.org; 31 Aug 2020 14:37:36 +0000 Original-Received: from localhost ([127.0.0.1]:53287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCkwC-0000LG-IO for submit@debbugs.gnu.org; Mon, 31 Aug 2020 10:37:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCkwA-0000L4-ID for 33648@debbugs.gnu.org; Mon, 31 Aug 2020 10:37:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57194) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCkw2-00014k-GU; Mon, 31 Aug 2020 10:37:26 -0400 Original-Received: from [176.228.60.248] (port=4034 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kCkw2-0000HR-0F; Mon, 31 Aug 2020 10:37:26 -0400 In-Reply-To: (message from Stefan Kangas on Mon, 31 Aug 2020 11:21:09 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186769 Archived-At: > From: Stefan Kangas > Date: Mon, 31 Aug 2020 11:21:09 +0000 > Cc: 33648@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.