all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: script-representative-chars vs incomplete fonts
Date: Mon, 13 Sep 2021 20:09:36 +0300	[thread overview]
Message-ID: <83v934cshb.fsf@gnu.org> (raw)
In-Reply-To: <87k0jlwi39.fsf@gmail.com> (message from Kévin Le Gouguec on Mon, 13 Sep 2021 00:21:30 +0200)

> From: Kévin Le Gouguec <kevin.legouguec@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Mon, 13 Sep 2021 00:21:30 +0200
> 
> >    CHARS is a list or a vector of characters.
> >
> > So both lists and vectors are possible and supported.
> 
> The docstring also says this:
> 
>     If it is a list, all characters in the list are necessary for
>     supporting SCRIPT.
>     If it is a vector, one of the characters in the vector is necessary.

So you want to require both upper- and lower-case variants?

> That led me to think that we'd want a list, but now that I've looked at
> ftfont.c and font.c more closely, I get the impression that this
> distinction only applies to the verification step in font_match_p?

Basically, yes.

> Hence it would indeed not matter whether we used a vector or a list for
> the purposes of querying fontconfig.

No, but if we require both upper- and lower-case variants, we will
reject fonts such as KpMath.

> (I hope I'm not misreading the code; apologies if so.  I'm still not
> entirely sure I understand why ftfont_spec_pattern seems to only handle
> the list case while ftfont_list only handles the vector case, but I'm
> sure I'll figure it out eventually after some more scowling)

ftfont_list calls ftfont_spec_pattern, so both variants are handled.
My reading of that code is that ftfont.c uses
script-representative-chars as fallback for the cases when the fontset
doesn't specify a script or a charset for a font.  ftfont.c then
creates a fake "charset" on the fly out of the representative
characters.



  reply	other threads:[~2021-09-13 17:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11 22:09 script-representative-chars vs incomplete fonts Kévin Le Gouguec
2021-09-12  5:54 ` Eli Zaretskii
2021-09-12 17:08   ` Kévin Le Gouguec
2021-09-12 17:30     ` Eli Zaretskii
2021-09-12 22:21       ` Kévin Le Gouguec
2021-09-13 17:09         ` Eli Zaretskii [this message]
2021-09-13 22:46           ` Kévin Le Gouguec
2021-09-14 11:25             ` 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

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

  git send-email \
    --in-reply-to=83v934cshb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.