unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51495: 29.0.50; [PATCH] Avoid fonts with incomplete coverage of MATHEMATICAL chars
@ 2021-10-29 21:40 Kévin Le Gouguec
  2021-10-29 21:43 ` Kévin Le Gouguec
  0 siblings, 1 reply; 3+ messages in thread
From: Kévin Le Gouguec @ 2021-10-29 21:40 UTC (permalink / raw)
  To: 51495

Hello,

This is a followup to a discussion on help-gnu-emacs[1] which revealed
that script-representative-chars does not account for problematic fonts
like KpMath[2] which provide only partial coverage for the MATHEMATICAL
SCRIPT codepoints U+1D49C–U+1D4CF (𝒜–𝓏).

To be more specific, this font only covers MATHEMATICAL SCRIPT CAPITAL
codepoints and does not cover MATHEMATICAL SCRIPT SMALL codepoints.

Since setup-default-fontset only puts MATHEMATICAL SCRIPT CAPITAL A in
script-representative-chars, Emacs fails to ensure that the fonts
returned by Fontconfig also provide glyphs for SMALL codepoints.

As soon as I get a bug number, I'll followup with a patch (reviewed by
Eli[3]) that deals with the situation by adding both ends of each
"math-subgroup" to script-representative-chars, using lists rather than
vectors to make each codepoint mandatory.

From the discussion, it seems that this problem is not very common (the
gap in KpMath seems very uncommon[2]), and has multiple workarounds
(uninstalling the font, tweaking fontconfig rules, tweaking fontsets),
so although the patch applies to both master and emacs-28, I guess there
is no pressing need to have this on the release branch, and master would
be more appropriate?

Thank you for your time.


[1] help-gnu-emacs <878s02u5m6.fsf@gmail.com>
    https://lists.gnu.org/archive/html/help-gnu-emacs/2021-09/msg00150.html

[2] http://mirrors.ctan.org/fonts/kpfonts-otf/doc/unimath-kpfonts.pdf
    § 15.1.7, 15.1.8

[3] help-gnu-emacs <83k0jjcsal.fsf@gnu.org>
    https://lists.gnu.org/archive/html/help-gnu-emacs/2021-09/msg00192.html


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
 of 2021-10-26 built on amdahl30
Repository revision: f56408a6f0152cd46d1ea8a0985fbfeeb839ea06
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: openSUSE Tumbleweed





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

end of thread, other threads:[~2021-10-30 12:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 21:40 bug#51495: 29.0.50; [PATCH] Avoid fonts with incomplete coverage of MATHEMATICAL chars Kévin Le Gouguec
2021-10-29 21:43 ` Kévin Le Gouguec
2021-10-30 12:44   ` Lars Ingebrigtsen

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