Subject: bug#32210: Support medium weighted fonts

From: Carlos Pita <[email-masked]>
Date: Thu, 19 Jul 2018 11:06:22 -0300

(I'm unable to access my emacs now so sorry for reporting this from my
phone. Ask for any additional details and I will provide them ASAP.)

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.

One good example is the aforementioned font. In xfce4-terminal I get all
regular, medium and demibold variants. Medium is a nice default weight,
demibold being too close to bold for regular usage. In emacs I get only the
too thin regular weight (using regular or medium weights) or the too fat
demibold (using demi/semibold).

I think this is a relevant issue since emacs is mostly a programmer's tool
and being unable to use the best font in a set designed for programming is
not just a minor annoyance.

One general solution would be to allow numerical values for weight, but
nevertheless the medium symbol should be assigned the right meaning.