bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eli Zaretskii
Subject: bug#51821: 29.0.50; Suggest add variable or frame parameter: line-height
Date: Fri, 19 Nov 2021 10:04:27 +0200

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: tumashu@163.com,  luangruo@yahoo.com,  51821@debbugs.gnu.org
> Date: Fri, 19 Nov 2021 08:12:30 +0100
> 
> Eli Zaretskii <eliz@gnu.org> 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 :-(





reply via email to

[Prev in Thread] Current Thread [Next in Thread]