Subject: Re: bug#51821: 29.0.50; Suggest add variable or frame parameter: line-height

From: Eli Zaretskii <[email-masked]>
Date: Sun, 14 Nov 2021 13:29:03 +0200

> From: "Feng Shu" <[email-masked]>
> Date: Sun, 14 Nov 2021 07:28:46 +0800
> 
> I have try the below code, and it work
>  
>    (insert (propertize "\n" 'line-height 1.4))
>  
> But how to apply line-height global and let line-height work with
> mode/header/tab-bar?  
> 
> 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.

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?

So what would be the correct interpretation of the line-height
variable or frame parameter, when different faces are being used?