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

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

bug#51277: 27.1; menu-set-font not loading correct font


From: Lars Ingebrigtsen
Subject: bug#51277: 27.1; menu-set-font not loading correct font
Date: Thu, 21 Oct 2021 14:59:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Robert Pluim <rpluim@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.

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

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

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?

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

I've looked at the documentation

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

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

        weight: 53(f)(s)

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

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

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





reply via email to

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