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


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

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: Re: bug#32210: Support medium weighted fonts
Date: Mon, 18 Nov 2019 11:28:49 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> so Pando has also grown a MEDIUM in addition to NORMAL...  and we don't
>> have PANGO_WEIGHT_NORMAL.
>
> A related question is: can the GTK font selection dialog return
> PANGO_WEIGHT_MEDIUM (when you choose a font with that weight)?

I installed the following debugging

diff --git a/src/gtkutil.c b/src/gtkutil.c
index c4d2ef9d80..b1b3e4c397 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2300,6 +2300,10 @@ xg_get_font (struct frame *f, const char *default_name)
 	  PangoWeight weight = pango_font_description_get_weight (desc);
 	  PangoStyle  style  = pango_font_description_get_style (desc);
 
+	  CALLN (Fmessage, build_string ("Weight: %s, symbol %s"),
+		 make_int (weight),
+		 XG_WEIGHT_TO_SYMBOL (weight));
+ 
 	  font = CALLN (Ffont_spec,
 			QCfamily, build_string (family),
 			QCsize, make_float (pango_units_to_double (size)),

and tried using the gtk selector (via M-x menu-set-font).  I only have
one font installed that has both normal and medium variations "Nimbus
no9", so I tried that.  And I got:

Weight: 400, symbol normal
Weight: 700, symbol bold

And, yes, the thing that's called Nimbus No9 Medium does look like a
bold in both the gtk selector and in Emacs.  So I don't think I have a
proper font to experiment with...  does anybody know of a font in Debian
Stable that has both varieties?  SauceCodePro was the example in the
bug report, but that does not seem to be available here.

-- 
(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.