From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#51495: 29.0.50; [PATCH] Avoid fonts with incomplete coverage of MATHEMATICAL chars Date: Fri, 29 Oct 2021 23:40:39 +0200 Message-ID: <87fssjv7ag.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24579"; mail-complaints-to="usenet@ciao.gmane.io" To: 51495@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 29 23:54:50 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mgZpp-0006Di-Q6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Oct 2021 23:54:49 +0200 Original-Received: from localhost ([::1]:33412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgZpo-000534-KY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Oct 2021 17:54:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgZcU-0004Cd-SQ for bug-gnu-emacs@gnu.org; Fri, 29 Oct 2021 17:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44629) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgZcU-00069E-IB for bug-gnu-emacs@gnu.org; Fri, 29 Oct 2021 17:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgZcU-0006O1-GQ for bug-gnu-emacs@gnu.org; Fri, 29 Oct 2021 17:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Oct 2021 21:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51495 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163554365124519 (code B ref -1); Fri, 29 Oct 2021 21:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Oct 2021 21:40:51 +0000 Original-Received: from localhost ([127.0.0.1]:56175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgZcJ-0006NP-9W for submit@debbugs.gnu.org; Fri, 29 Oct 2021 17:40:51 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgZcG-0006NG-Uy for submit@debbugs.gnu.org; Fri, 29 Oct 2021 17:40:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgZcF-0003pO-0u for bug-gnu-emacs@gnu.org; Fri, 29 Oct 2021 17:40:48 -0400 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:35793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgZcD-00067l-3j for bug-gnu-emacs@gnu.org; Fri, 29 Oct 2021 17:40:46 -0400 Original-Received: by mail-wr1-x430.google.com with SMTP id i5so11066580wrb.2 for ; Fri, 29 Oct 2021 14:40:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ENxcGyojVrkmcYPcULUGQfj5CHO3R32i0XTM5D1xQOw=; b=BR2UG+2jDLfFfBGknZDcBe2e0nz9eJkPyOGWz2P//WXEmReq7XHeY2ziq8Ny5mzYSY BqJuMZKSKoXwbysKhoTe7dMPUkHL7SKKPgGyErffVDlmOKnhXmGj7N58zazb+z5Kom3U snVBURlnAPf+IvLadY0dBj35gzpooHtjzA/jTXrZxZm+rlfaazHvaEtQq8ANb1daJvAc FXUuOW5lC37pgjgngycVXEsYmOs9UCNgE1j75RanfMlBTX4k3bUqu/pNLSHgf9TUJ1Xb bxaALK9AIKAxhZFbMHfk6ZCUoLTMbmzxydkuh0tviiN5RdkKaZS8EFuiLhImxiqNMeZu SYaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ENxcGyojVrkmcYPcULUGQfj5CHO3R32i0XTM5D1xQOw=; b=nn45op2q+Q2qgEPGoAUzNYQHdTJAQDDDPmL7B/pRSCXuT5uQ+cn97DF9Hf7zDgq91f J26EtWJdAESMGqdMTNu5Oj73ulm0+euFdrBCSb2jrvI3YeH/H0M4H8i+ONg66O+MSl29 Qyf9QVlc0GxU8sIBj8zWZd94ZlqiahwQ8R1Nqs7F+p8i8FObxafzw/8GDsV2fOqfQuO0 ud8N/oIioBPilwricCVFUgWExmOW2PY4CO90H0rzkAZuPOWlDyAPVaS6rB+4ZxtwewXt 6ukuESfj+/JhgAmetdJuP061X3m/DUxoUmxdSAf4YwZFJ5QCDmcNrGfNgNxjQk/utaUA qhhg== X-Gm-Message-State: AOAM531fWQvBBQJVHnV236OA1yenw1RZ065QBHtrM4SGbxefXWr3J3zx 0hcCjGHGOhkBCDsQK1dUjb/+KkfTxGw= X-Google-Smtp-Source: ABdhPJwtRJQuf6sxRXLvBK0UD5rr2FPBeAHIy3VC1xVcCmf22CtjVf3CLliAZdLdg/51ghOui8ME7w== X-Received: by 2002:a05:600c:2505:: with SMTP id d5mr14095797wma.194.1635543640660; Fri, 29 Oct 2021 14:40:40 -0700 (PDT) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id f3sm9751682wmb.12.2021.10.29.14.40.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 14:40:40 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=kevin.legouguec@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218597 Archived-At: 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=E2=80=93U+1D4CF (=F0=9D=92=9C=E2=80=93=F0=9D=93= =8F). 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 =C2=A7 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, c= airo 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