unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yukio Siraichi <sir.yukio@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Use fontconfig spec for parsing font-weight.
Date: Mon, 17 May 2021 10:30:45 +0300	[thread overview]
Message-ID: <83sg2lu89m.fsf@gnu.org> (raw)
In-Reply-To: <75349245-3caa-ea30-939d-0a2b8bc32aa5@gmail.com> (message from Yukio Siraichi on Mon, 17 May 2021 15:25:55 +0900)

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



  parent reply	other threads:[~2021-05-17  7:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17  4:37 [PATCH] Use fontconfig spec for parsing font-weight Yukio Siraichi
2021-05-17  6:14 ` Eli Zaretskii
     [not found]   ` <75349245-3caa-ea30-939d-0a2b8bc32aa5@gmail.com>
2021-05-17  7:30     ` Eli Zaretskii [this message]
2021-05-17  7:44       ` Eli Zaretskii
     [not found] <1b6ef436-2f32-bfed-f0a8-f55aa4852ccd@gmail.com>
2021-05-17  9:54 ` Eli Zaretskii
2021-05-17 10:11   ` Yukio Siraichi
2021-05-17 10:29     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sg2lu89m.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=sir.yukio@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).