GNU bug report logs - #57962
29.0.50; Odd font choices

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Tue, 20 Sep 2022 22:17:01 UTC

Severity: normal

Found in version 29.0.50

Full log


Message #56 received at 57962 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: luangruo <at> yahoo.com, 57962 <at> debbugs.gnu.org
Subject: Re: bug#57962: 29.0.50; Odd font choices
Date: Sun, 16 Oct 2022 14:17:55 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: luangruo <at> yahoo.com,  57962 <at> debbugs.gnu.org
> Date: Sun, 16 Oct 2022 12:58:18 +0200
> 
> I've poked around some more here, experimenting with different fonts
> with -fn, and the thing is that everything works as expected with most
> fonts (i.e., the height of `fixed-pitch' and `default' fonts are the
> same, which is the problem, really) -- but with the default font in
> Ubuntu, "Ubuntu Mono", that's not the case.
> 
> So Emacs has chosen these two fonts for `default' and `fixed-pitch',
> respectively:
> 
>     ftcrhb:-DAMA-Ubuntu Mono-regular-normal-normal-*-48-*-*-*-m-0-iso10646-1 (#x2C)
>     ftcrhb:-PfEd-DejaVu Sans Mono-regular-normal-normal-*-48-*-*-*-m-0-iso10646-1 (#x26)
> 
> Is there something more Emacs could be doing to try to ensure that it
> picks equal-sized fonts?  By somehow looking at actual font metrics?

When we select a suitable font, we generally avoid opening a font,
because that's expensive.  So looking at the metrics is not possible,
unless we actually open each font.

But I don't think I understand what is going on here: these two fonts
are of the same size -- 48 -- so how come the glyphs have different
sizes?  And how different are they?  Can you look at the character
metrics inside gui_produce_glyphs and tell what we get from each font?

> (I guess we're currently just saying "give me this font in size 48"?

I think so, yes.  But if the font spec doesn't specify a size, maybe
we get different sizes?  Although the fact that both are "48" seems to
say we do get the same size?

> And that the actual size of the glyphs may vary between fonts?)

Not sure how this can happen, but I'm not enough of an expert on
fonts, sorry.




This bug report was last modified 2 years and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.