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: Thu, 21 Oct 2021 14:49:56 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>>  static const struct table_entry weight_table[] =
>>  {
>>    { 0, { "thin" }},
>> -  { 20, { "ultra-light", "ultralight" }},
>> -  { 40, { "extra-light", "extralight" }},
>> +  { 40, { "ultra-light", "ultralight", "extra-light", "extralight" }},
>
> This loses the distinction between ultra-light and extra-light.  Are
> these two really indistinguishable in all supported font backends?

I added them together because the Gtk documentation (and the Windows
one, I think? I've been working on this for a while, and some of the
details are vague) said that there's only one weight between "light" and
"thin", so people specifying "ultra-light" wouldn't actually get it,
because 20 is too far from being correct.

I fc-queried all the 1K fonts on this system, and indeed -- none of them
had a weight of 20.  There were weights at 0 and 40, though (and none
inbetween).

So I'm as confident about that change as...  er...  well, it's font
stuff, so I'm not confident at all, but I think it's worth a try.  I'll
test this stuff on FreeBSD and see what it says there, once I get the
VMs up again on my new VM machine.

>>  static Lisp_Object
>>  w32_to_fc_weight (int n)
>>  {
>> -  if (n >= FW_HEAVY)     return intern ("black");
>> +  if (n >= FW_HEAVY)     return Qbold;
>>    if (n >= FW_EXTRABOLD) return Qextra_bold;
>
> This doesn't look right.  Should that Qbold be Qblack?

Good catch.  Now fixed.

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