From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Feng Shu" Newsgroups: gmane.emacs.bugs Subject: bug#51821: 29.0.50; Suggest add variable or frame parameter: line-height Date: Mon, 15 Nov 2021 06:37:23 +0800 Message-ID: <87r1biqs7w.fsf@163.com> References: <87bl2nhbyp.fsf@163.com> <83bl2nugao.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28582"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51821@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 14 23:38:12 2021 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 1mmO8Y-0007Ga-Pc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Nov 2021 23:38:11 +0100 Original-Received: from localhost ([::1]:56722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmO8X-0000uM-42 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Nov 2021 17:38:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmO8Q-0000tw-9w for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2021 17:38:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmO8P-0005yG-Vy for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2021 17:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmO8P-0004Hq-R3 for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2021 17:38:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Feng Shu" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 22:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51821 X-GNU-PR-Package: emacs Original-Received: via spool by 51821-submit@debbugs.gnu.org id=B51821.163692945416437 (code B ref 51821); Sun, 14 Nov 2021 22:38:01 +0000 Original-Received: (at 51821) by debbugs.gnu.org; 14 Nov 2021 22:37:34 +0000 Original-Received: from localhost ([127.0.0.1]:51952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmO7y-0004H3-0V for submit@debbugs.gnu.org; Sun, 14 Nov 2021 17:37:34 -0500 Original-Received: from m12-17.163.com ([220.181.12.17]:37173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmO7t-0004Gq-Sc for 51821@debbugs.gnu.org; Sun, 14 Nov 2021 17:37:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=+EGoO V5wlMW9ZSPJy6nhLwKiK0Wik3fZDL3ED7uE8GE=; b=G5VIXxdFK8DmzHf1SrMhE Cz5unLBnYDR+Mf3DX9JuDwk5PyTpkJ7l6WCza4H85y+CfE7ghKcIvqHvNUY6s8fh sMVHONP3afjHdKENMzqOaBswWMFnNZPQ+Y8AuhDSpurL/LlHX6pPd1Zby2whGzjt Qr2olzQKkBAejQGoTMUgp4= Original-Received: from tumashu (unknown [49.88.37.140]) by smtp13 (Coremail) with SMTP id EcCowACnknqkj5Fh7pbIXg--.2319S2; Mon, 15 Nov 2021 06:37:24 +0800 (CST) In-Reply-To: <83bl2nugao.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov 2021 13:29:03 +0200") X-CM-TRANSID: EcCowACnknqkj5Fh7pbIXg--.2319S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Cr4fCFyxXFWruF1xur17KFg_yoW8Ary7pa 43t3Z7AF1DKF4F9340vw15uF4a9ws3JF47KwnakryUZa1DJ34xAFWrt34Yvr9rur1UAa4Y qr4xKw17ua4UZFDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07U4UDAUUUUU= X-Originating-IP: [49.88.37.140] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiqwRL1FUMbiehVQAAsU 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:220015 Archived-At: Eli Zaretskii writes: >> From: "Feng Shu" >> Date: Sun, 14 Nov 2021 07:28:46 +0800 >>=20 >> I have try the below code, and it work >>=20=20 >> (insert (propertize "\n" 'line-height 1.4)) >>=20=20 >> But how to apply line-height global and let line-height work with >> mode/header/tab-bar?=20=20 >>=20 >> Maybe we should add a variable or frame parameter: line-height > > Adding a variable is easy, but what would be its semantics? Emacs can > display different faces in the same window, and some of those faces > can have smaller height. If the line of text in a window uses the > smaller faces, that line's height will be smaller as well. > > For example, evaluate the following: > > (defface small > '((t :height 0.6)) > "") > > Then visit some file, and do this: > > M-x font-lock-mode RET > M-x load-library RET facemenu RET > C-SPC > C-n > C-n > M-x facemenu-set-face RET small RET > > Now you should see 2 lines in a smaller font; those lines have > correspondingly smaller height. I think user should set to (t . RATIO) instead in most case. Maybe line-height can be a alist ((face1 . RATIO) (face2 .RATIO)). =E2=80=98(FACE . RATIO)=E2=80=99 If the height spec is a cons of the format shown, the numeric height is RATIO times the height of face FACE. RATIO can be any type of number, or =E2=80=98nil=E2=80=99 which means a ratio of 1. If= FACE is =E2=80=98t=E2=80=99, it refers to the current face. > > So if we require all the lines to be at least line-height pixels, > those smaller lines will also become higher, and that is not what's > expected, I guess? If user set line-height to a INTEGER with a variable, I think it is user expected. > > So what would be the correct interpretation of the line-height > variable or frame parameter, when different faces are being used? --=20