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

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

bug#29078: 25.2; font issue with FreeType 2.8; should not use the rounde


From: Vincent Lefevre
Subject: bug#29078: 25.2; font issue with FreeType 2.8; should not use the rounded ascender and descender
Date: Mon, 18 Nov 2019 19:15:27 +0100
User-agent: Mutt/1.12.1+19 (078654a4) vl-117499 (2019-06-15)

On 2019-11-18 19:50:09 +0200, Eli Zaretskii wrote:
> > Date: Mon, 18 Nov 2019 18:23:33 +0100
> > From: Vincent Lefevre <vincent@vinc17.net>
> > Cc: larsi@gnus.org, 29078@debbugs.gnu.org
> > 
> > AFAIK, from the font description (which does not involve rounding),
> > there is no gap (that's why the FreeType developers suggested not
> > to use the rounded values). Moreover, it does not make much sense
> > to insert a gap. This looks ugly and this wastes screen space.
> 
> Emacs doesn't insert any gaps, it just computes the line metrics from
> all the characters displayed on that line.

There are different ways to do the computation, and due to the rounded
values, they give different results. Compared to the cell height,
there is a gap. When I analyzed the issue with xterm, I could find
that with the rounded metrics, height < ascent + descent (while this
is an equality with the unrounded metrics).

> I've read the discussions of the FreeType developers, but couldn't
> understand what they were talking about, as the discussion was in
> terms of internals of FreeType, and I don't know enough to map that to
> what the Emacs display engine does.
> 
> My point is that this seems to have nothing to do with the FreeType
> library or its version,

The issue appeared just after upgrading FreeType from 2.6 to 2.8,
and the FreeType developers said this was because they changed the
rounding rules for ttf fonts.

> since I see the same on a system that uses neither FreeType nor this
> particular font. IOW, this looks to me "normal", i.e. Emacs always
> worked like that.

Of course, if you change the font, you may see something different.

I've attached what I get with the fixed bitmap font. As you can see,
there is no gap, and this is the expected rendering (with bitmap fonts,
there are no rounding issues, thus what is shown is as designed).

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Attachment: fixed.png
Description: PNG image


reply via email to

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