GNU bug report logs - #51277
27.1; menu-set-font not loading correct font

Previous Next

Package: emacs;

Reported by: Jesse Sheidlower <jester <at> panix.com>

Date: Mon, 18 Oct 2021 22:09:02 UTC

Severity: normal

Found in version 27.1

Full log


View this message in rfc822 format

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Jesse Sheidlower <jester <at> panix.com>, 51277 <at> debbugs.gnu.org
Subject: bug#51277: 27.1; menu-set-font not loading correct font
Date: Thu, 21 Oct 2021 17:37:55 +0200
>>>>> On Thu, 21 Oct 2021 14:59:14 +0200, Lars Ingebrigtsen <larsi <at> gnus.org> said:

    Lars> Robert Pluim <rpluim <at> gmail.com> writes:
    Lars> then I get something that looks very wrong indeed.  Anybody know a
    Lars> program that understands these things?
    >> 
    >> FC_DEBUG=1 xfce4-terminal --font "Operator Mono SSm:weight=book"
    >> 
    >> will get you fontconfig debug telling you which actual font is
    >> used.

    Lars> Yeah, but surely there must be some other program (other than Emacs)
    Lars> that actually uses this syntax for specifying fonts?  I thought it was
    Lars> supposed to be...  "the way"...

Dunno. Specifying fonts on the command line is apparently passé.

    >> gedit rounds down to the nearest multiple of 100, which equates to >=

    Lars> Huh.

    >> I guess the root cause of all of this is that weʼre mapping
    >> PangoWeights to symbolic constants, which we then pass to
    >> fontconfig. Perhaps we could arrange to pass the weights directly?

    Lars> Indeed, the Pango round trip through symbols is inherently breakable.  I
    Lars> mean, the Gtk chooser knows exactly what font I've selected -- but is
    Lars> there any way to get it to cough up that instead of the Pango weights?

I donʼt think so: Pango is supposed to abstract away from all that.

    Lars> I've looked at the documentation

    Lars> https://docs.gtk.org/Pango/struct.FontDescription.html

    Lars> and nothing really jumped out at me.  I mean, in this case, Pango
    Lars> reports a weight of 330 for book...  but the actual weight in the file is: 

    Lars>         weight: 53(f)(s)

    Lars> So after mapping to symbols and back again, we'll never find that font
    Lars> (because "book" is at 80).

    Lars> But...  what does (f)(s) mean here?

Type double with a strong binding. I once knew what the distinction is
between strong/weak, but like all things fontconfig that knowledge
tends to disappear.

Robert
-- 




This bug report was last modified 3 years and 319 days ago.

Previous Next


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