Subject: Re: bug#32210: Support medium weighted fonts

From: Eli Zaretskii <[email-masked]>
Date: Sun, 17 Nov 2019 17:59:53 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Sun, 17 Nov 2019 09:37:45 +0100
> Cc: [email-masked]
> 
> > 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" }}
> };

I don't think this is the only place.  For example,
XG_WEIGHT_TO_SYMBOL looks also relevant.  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.  For example, Someone™ should verify that the problem
described above is not some inherent GTK limitation.