all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 29078@debbugs.gnu.org
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	[thread overview]
Message-ID: <20191118181527.GA1940@cventin.lip.ens-lyon.fr> (raw)
In-Reply-To: <83lfsd2hwu.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2074 bytes --]

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 #2: fixed.png --]
[-- Type: image/png, Size: 7995 bytes --]

  parent reply	other threads:[~2019-11-18 18:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 10:12 bug#29078: 25.2; font issue with FreeType 2.8; should not use the rounded ascender and descender Vincent Lefevre
2017-10-31 10:53 ` Robert Pluim
2017-10-31 11:22   ` Werner LEMBERG
2017-10-31 13:43     ` Vincent Lefevre
2017-10-31 15:45       ` Werner LEMBERG
2017-10-31 14:00     ` Robert Pluim
2017-10-31 16:24       ` Werner LEMBERG
2019-11-17  8:02 ` Lars Ingebrigtsen
2019-11-18  7:47   ` Vincent Lefevre
2019-11-18  8:30     ` Lars Ingebrigtsen
2019-11-18 16:05       ` Eli Zaretskii
2019-11-19 10:07         ` Robert Pluim
2019-11-19 11:34           ` Vincent Lefevre
2019-11-19 16:41             ` Stefan Kangas
2019-11-19 17:33               ` Eli Zaretskii
2019-11-18 15:36     ` Eli Zaretskii
2019-11-18 16:04       ` Vincent Lefevre
2019-11-18 17:09         ` Eli Zaretskii
2019-11-18 17:23           ` Vincent Lefevre
2019-11-18 17:50             ` Eli Zaretskii
2019-11-18 17:58               ` Eli Zaretskii
2019-11-18 18:20                 ` Vincent Lefevre
2019-11-18 18:31                   ` Eli Zaretskii
2019-11-18 18:15               ` Vincent Lefevre [this message]
2019-11-18 18:32         ` Lars Ingebrigtsen
2019-11-18 20:26           ` Vincent Lefevre
2019-11-18 20:31             ` Lars Ingebrigtsen
2019-11-19 15:55               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191118181527.GA1940@cventin.lip.ens-lyon.fr \
    --to=vincent@vinc17.net \
    --cc=29078@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.