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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 19 Nov 2021 10:04:27 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Fri, 19 Nov 2021 08:12:30 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > +  DEFVAR_LISP ("line-height-factor", Vline_height_factor,
> > +    doc: /* Factor for enlarging the height of lines that use the default font.
> > +The value should be a float number greater than 1.  It determines how
> > +much will Emacs enlarge the height of a screen line that shows only
> > +characters displayed with the default face's font for ASCII characters.
> > +This is to avoid differences in height between lines that use the
> > +ASCII font and those which use non-ASCII (for example, Chinese)
> > +font, which is typically higher than the ASCII one.  */);
> 
> Is tying this to the default font the best solution, though?  Emacs (by
> default) uses at least two fonts -- one monospaced and one that's
> proportional, and this will only fix the first issue.

No, it should fix both.  Did you try that?  If you did and it didn't
work, can you show a recipe from "emacs -Q" so I could investigate?

The "default font" part above is an over-simplification: it is hard to
say something accurate enough in a single short sentence.  I did try
to explain it more in the rest of the doc string: this actually
affects any font which some face uses for ASCII characters.

> Testing the patch, it also affects the height of faces with :height in
> them, meaning that separator lines get much taller than they should be.

As I told you, it is currently impossible to single out such faces.
Also, I don't think we should necessarily exempt _any_ face that
specifies :height, because if that face is used to display with mixed
fonts, it will again have the same problem when both CJK fonts and
non-CJK fonts are mixed.  The separator lines are thus a very special
case, and if we want to solve that, we need a more focused solution.
For example, we could not stretch the height if the face's height is
below some threshold, on the assumption that such small fonts will
never used to display human-readable text.

But first I want to hear that CJK users are happy with this, and it
for now sounds like they aren't :-(