unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: 51495@debbugs.gnu.org
Subject: bug#51495: 29.0.50; [PATCH] Avoid fonts with incomplete coverage of MATHEMATICAL chars
Date: Fri, 29 Oct 2021 23:40:39 +0200	[thread overview]
Message-ID: <87fssjv7ag.fsf@gmail.com> (raw)

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





             reply	other threads:[~2021-10-29 21:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 21:40 Kévin Le Gouguec [this message]
2021-10-29 21:43 ` bug#51495: 29.0.50; [PATCH] Avoid fonts with incomplete coverage of MATHEMATICAL chars Kévin Le Gouguec
2021-10-30 12:44   ` Lars Ingebrigtsen

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=87fssjv7ag.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --cc=51495@debbugs.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 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).