emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use fontconfig spec for parsing font-weight.


From: Eli Zaretskii
Subject: Re: [PATCH] Use fontconfig spec for parsing font-weight.
Date: Mon, 17 May 2021 10:30:45 +0300

[Please use Reply All to keep the list address on CC.]

> From: Yukio Siraichi <sir.yukio@gmail.com>
> Date: Mon, 17 May 2021 15:25:55 +0900
> 
>  > Thanks, but why is it important for these fonts to appear in those
>  > lists? What is the practical advantage of that for Emacs users?
> 
> Well, anyone that wants to use a 'semilight' defined font would benefit 
> from this patch. Without it, I believe there is no way to use those fonts.

Use those fonts how and in what situations?  IOW, could you please
describe a complete use scenario where having these fonts in the list
would be beneficial?

I'm asking because AFAIK Emacs has the following built-in :weight
values (and some aliases of them) for a face:

  ‘ultra-bold’, ‘extra-bold’, ‘bold’, ‘semi-bold’, ‘normal’,
  ‘semi-light’, ‘light’, ‘extra-light’, ‘ultra-light’

The value ‘book’ is not one of them, it is currently an alias of
‘semi-light’.  Your patch adds a separate ‘book’ value, and also
changes the numeric equivalent of ‘semi-light’.  AFAICT, this will
change the results of converting a font's weight to the corresponding
Emacs symbolic value, see the function font_style_symbolic, where you
will clearly see that the numeric values in the weight_table table are
not randomly chosen.  E.g., some fonts that are currently considered
to be of ‘normal’ weight will be considered to be of ‘book’ weight as
result of your change, because the number of entries will change, and
so indexing into the weight table will change as well.

So this small and seemingly simple change will have over-reaching
effects all over Emacs, when font selection and use in faces is
considered, and I think we need to have a good understanding of why we
are making it before we decide to do it.  (Obviously, documentation
will need to be updated as well, something your patch doesn't do.)

But maybe I'm missing something, and this is not actually such a big
problem?  Would people who have good understanding of the effect of
this change and the need to make it please chime in?

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]