unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* script-representative-chars vs incomplete fonts
@ 2021-09-11 22:09 Kévin Le Gouguec
  2021-09-12  5:54 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Kévin Le Gouguec @ 2021-09-11 22:09 UTC (permalink / raw)
  To: help-gnu-emacs

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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-14 11:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2021-09-13 22:46           ` Kévin Le Gouguec
2021-09-14 11:25             ` Eli Zaretskii

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