GNU bug report logs - #32210
Support medium weighted fonts

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Thu, 19 Jul 2018 14:07:02 UTC

Severity: normal

Merged with 28351, 51155

Found in versions 26.0.50, 29.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: carlosjosepita <at> gmail.com, 32210 <at> debbugs.gnu.org
Subject: bug#32210: Support medium weighted fonts
Date: Sun, 17 Nov 2019 18:06:51 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> I don't think this is the only place.  For example,
> XG_WEIGHT_TO_SYMBOL looks also relevant.

Interesting...

#define XG_WEIGHT_TO_SYMBOL(w)			\
  (w <= PANGO_WEIGHT_THIN ? Qextra_light	\
   : w <= PANGO_WEIGHT_ULTRALIGHT ? Qlight	\
   : w <= PANGO_WEIGHT_LIGHT ? Qsemi_light	\
   : w < PANGO_WEIGHT_MEDIUM ? Qnormal		\
   : w <= PANGO_WEIGHT_SEMIBOLD ? Qsemi_bold	\
   : w <= PANGO_WEIGHT_BOLD ? Qbold		\
   : w <= PANGO_WEIGHT_HEAVY ? Qextra_bold	\
   : Qultra_bold)

If we look at

https://abi-laboratory.pro/?view=headers_diff&l=pango&v1=1.36.5&v2=1.36.6

we find

* @PANGO_WEIGHT_NORMAL: the default weight (= 400)
* @PANGO_WEIGHT_MEDIUM: the normal weight (= 500; Since: 1.24)

so Pando has also grown a MEDIUM in addition to NORMAL...  and we don't
have PANGO_WEIGHT_NORMAL.

> And there are other places in the sources that only support subsets of
> all the weights.  If we want to make them more fine-grained, we should
> make them all consistent, as much as possible, modulo the limitations
> of the toolkit.

Yup.  

> For example, Someoneā„¢ should verify that the problem described above
> is not some inherent GTK limitation.

If we look at

https://emacs.stackexchange.com/questions/32377/selecting-correct-font-weight-variant-linux

people seem to be instructing Emacs to use the sizes adjacent to Emacs
normal/medium to actually get the weights they want, and then it works.
Also see bug#28351 (which I've merged with this one).

But is this something we want to tweak before Emacs 27, or should it
wait for Emacs 28?  

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




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

Previous Next


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