all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: script-representative-chars vs incomplete fonts
Date: Sun, 12 Sep 2021 00:09:21 +0200	[thread overview]
Message-ID: <878s02u5m6.fsf@gmail.com> (raw)

Hello,

IIUC, fontset.el sets up script-representative-chars so that any font
providing U+1D49C "𝒜" can be used for the whole "mathematical-script"
range (U+1D49C–U+1D4CF "𝒜–𝓏").

On my system, I happen to have

- one font (KpMath) that provides U+1D49C–U+1D4B5 (the "capital" chars),
  but not U+1D4B6–U+1D4CF (the "small" chars),

- another font (DejaVu Math TeX Gyre) that provides both sub-ranges[1].

As luck would have it, when trying to display a char in this range,
Emacs stumbles on KpMath first, and thus fails to display the "small"
sub-range (𝒶–𝓏): I get the dreaded "hex-in-a-box" placeholder for these
"small" codepoints.

The situation is not irremediable; I've thought of at least 3
workarounds[2].  I do wonder though if this situation is something Emacs
should guard against by default, and if so, with what heuristics?

E.g. in fontset.el, would it be overkill to break down the 52-char
ranges in the math-subgroup loop into 2 26-char ranges in order to
always add the "SMALL A" codepoints to script-representative-chars?

(The current loop builds vectors though; maybe we'd want lists?)

I'm sending this to help-gnu-emacs because I'm mostly puzzled; I don't
know if this problem is noteworthy enough to warrant a bug report.

Thoughts welcome.


[1] … minus, of course, the codepoints that do not exist because they
    are redundant with those in the "Letterlike Symbols" block.

[2] 1 and 2 work; haven't tried 3 yet:

    1. (push #x1D4CF (alist-get 'mathematical-script
                                script-representative-chars))
    2. (set-fontset-font
        t 'mathematical "DejaVu Math TeX Gyre" nil 'prepend)
    3. Uninstall KpMath.



             reply	other threads:[~2021-09-11 22:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11 22:09 Kévin Le Gouguec [this message]
2021-09-12  5:54 ` script-representative-chars vs incomplete fonts 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
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=878s02u5m6.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --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.