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.help Subject: script-representative-chars vs incomplete fonts Date: Sun, 12 Sep 2021 00:09:21 +0200 Message-ID: <878s02u5m6.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="6202"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 12 00:10:07 2021 Return-path: Envelope-to: geh-help-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 1mPBCJ-0001Qm-7U for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 12 Sep 2021 00:10:07 +0200 Original-Received: from localhost ([::1]:53292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPBCH-0006RA-D2 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Sep 2021 18:10:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPBBe-0006Qn-Ik for help-gnu-emacs@gnu.org; Sat, 11 Sep 2021 18:09:26 -0400 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:40468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPBBd-0002JO-4P for help-gnu-emacs@gnu.org; Sat, 11 Sep 2021 18:09:26 -0400 Original-Received: by mail-wm1-x32e.google.com with SMTP id b21-20020a1c8015000000b003049690d882so1218740wmd.5 for ; Sat, 11 Sep 2021 15:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=0uroFrxvdy9JDI58FAQblsIM3NgOhgxw804tF51g13o=; b=RhnHrC/5UjvLMVQg4YVQPVkA99KMcZZ2lUNAxvGyUPyl2Aq2T9vKTs66ev7ryZC0y+ AmcFfsW51cQhLuRpNzjqc8FOIiJ2FjFNtT20XYycLIUQYiTqvDijSs/WtD44QZG/ATcx ZLBsqtU4Y8fdV1JvflI/DexCIrFmjYEU4ryQZdGNBiIckY2Z8DxdtbzUG/DsvCefgg2V kQs8BUCLwBqrghsQflFQOMH3o4+dr9hvIRyKVASkHdgOkV5nB8eZbP/VXex64+Sxnfse gEjHrZDS4TzWQyTe5UNc9GJSiKH+GqTtyYvX4OFREk5L6aLh83r8cnjTYQmFEeifwFHs Qlfw== 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:user-agent :mime-version:content-transfer-encoding; bh=0uroFrxvdy9JDI58FAQblsIM3NgOhgxw804tF51g13o=; b=gNgIvqcIJP9RAo0muz8/Y1tzwvlFW8fWQP+wBAaLiMBUBw6XeGTUBgYzm0Q4JaE6tT +ZUwFCzURcJX9lu5Qfbe8/QMzyz9kEpCdiw0kfklF5YfdW/J+v2Tm11U3DllHlkyZU2w cJOWXSbI6j9QaMmL5FwbQqbn4wSnPeQS+yrg5f5Y1UwECDJVpg2FHfz3RlcyRG3xYIjQ LruYG20sFfGX9sNEumANzBVp953nYCcjdkqL4DOlXARBlgsJV+vD9uR/nIY8y9l/a+rl 6ef90I7PRRVVZ2NFYoTFKPtRVFh2o0yQRPtFOXgkZHZEPMZFJBKNxrlH/5YrIPxXEDp4 u9bw== X-Gm-Message-State: AOAM53119yQj/m/IC5DZRQh4c8wEs8NOO1INLOHu7RYMqJ/KgOVDy82l Haf7ANKB0sU/I6S4WfBcCP0TQb8jjXw= X-Google-Smtp-Source: ABdhPJwkFSPapVSKSog/OIbzrjr0A4cxhkTH945oW/d4Bd7kq4r8hmi7HmZKpB53fIpaA7TpthEFKA== X-Received: by 2002:a05:600c:22ca:: with SMTP id 10mr4138678wmg.170.1631398162448; Sat, 11 Sep 2021 15:09:22 -0700 (PDT) Original-Received: from amdahl30 ([2a01:e0a:20e:d340:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id k4sm2539931wmj.30.2021.09.11.15.09.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 15:09:22 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=kevin.legouguec@gmail.com; helo=mail-wm1-x32e.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: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133000 Archived-At: Hello, IIUC, fontset.el sets up script-representative-chars so that any font providing U+1D49C "=F0=9D=92=9C" can be used for the whole "mathematical-sc= ript" range (U+1D49C=E2=80=93U+1D4CF "=F0=9D=92=9C=E2=80=93=F0=9D=93=8F"). On my system, I happen to have - one font (KpMath) that provides U+1D49C=E2=80=93U+1D4B5 (the "capital" ch= ars), but not U+1D4B6=E2=80=93U+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 (=F0=9D=92=B6=E2=80=93=F0=9D=93=8F): 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] =E2=80=A6 minus, of course, the codepoints that do not exist because th= ey 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.