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 #10 received at 32210 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 32210 <at> debbugs.gnu.org
Subject: Re: bug#32210: Support medium weighted fonts
Date: Sun, 17 Nov 2019 09:37:45 +0100
Carlos Pita <carlosjosepita <at> gmail.com> writes:

> Many programming fonts are designed for hidpi devices and look pretty
> bad (too thin and "diffused") in their default weight in antialiased
> settings with standard resolution screen.
>
> Nevertheless a number of fontsets provide medium and/or demibold variants in
> between the regular one and the bold one. For example, the medium
> SauceCodePro (based on SourceCodePro) looks much solid than the regular
> variant.
>
> Now, the problem is that, no matter how emacs font is configured
> (xresources with xft or gtk descriptor, customize-face, the standard
> gtk dialog launched from the menu) medium is taken as an alias for
> normal/regular and you have to jump from regular to demibold.

I think this is the culprit:

static const struct table_entry weight_table[] =
{
  { 0, { "thin" }},
  { 20, { "ultra-light", "ultralight" }},
  { 40, { "extra-light", "extralight" }},
  { 50, { "light" }},
  { 75, { "semi-light", "semilight", "demilight", "book" }},
  { 100, { "normal", "medium", "regular", "unspecified" }},
  { 180, { "semi-bold", "semibold", "demibold", "demi" }},
  { 200, { "bold" }},
  { 205, { "extra-bold", "extrabold" }},
  { 210, { "ultra-bold", "ultrabold", "black" }}
};

We define "medium" the same as "regular", but there are many fonts that
have both "regular" and "medium" variants, if I understand things
correctly.  Googling around a bit, it seems that most pages that
describe these things put "medium" at the halfway point between
"regular" and "demibold", which would mean a value of 140 for Emacs.

For instance:

https://www.quora.com/What-is-the-difference-between-Medium-Demi-and-Semibold-fonts
https://cssreference.io/property/font-weight/

Those are from a web/TrueType perspective, though.

Anybody have any thoughts on this issue?  The medium/regular
non-distinction in Emacs seems to crop up here and there, so it's a
problem in practice.

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