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

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 20 Nov 2021 09:26:19 +0100

Eli Zaretskii <[email-masked]> writes:

> 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?

No, I only tested in buffers with a monospaced font and then read the
doc string.

> 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.

Perhaps "default font(s)" would help.

>> 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.

Right, but I think I said that it should be pretty easy to carry that
information in struct face if we want to go that way.

> 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.

Hm...  Yeah, that's true.  For instance, in eww in <h1> we have :height
1.3, and we probably want the CJK/non-CJK font mixture to be handled the
same way as if there isn't a :height there.  OK, the :height thing
doesn't work.

> 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.

Hm, yes, the separator lines are very special, and the :height thing is
more a hack than anything else.  Perhaps we should just introduce a new
spec, like :pixel-height that allows us to specify specifically how big
the separator line should be.

Hm.  Or not use faces at all for the separator lines?  I don't know how
that would look, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no