From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.help Subject: Wrestling with set-fontset-font Date: Mon, 23 Dec 2019 19:15:25 +0100 Message-ID: <878sn2hps2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="184278"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 23 19:15:44 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ijSF6-000lmT-CK for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Dec 2019 19:15:44 +0100 Original-Received: from localhost ([::1]:59970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijSF4-0004fS-Hp for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Dec 2019 13:15:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47053) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijSEt-0004eW-PW for help-gnu-emacs@gnu.org; Mon, 23 Dec 2019 13:15:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijSEs-0008EU-Lp for help-gnu-emacs@gnu.org; Mon, 23 Dec 2019 13:15:31 -0500 Original-Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:40188) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ijSEs-0008Dp-DV for help-gnu-emacs@gnu.org; Mon, 23 Dec 2019 13:15:30 -0500 Original-Received: by mail-wm1-x331.google.com with SMTP id t14so232365wmi.5 for ; Mon, 23 Dec 2019 10:15:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=k5Auw4CczUSRUzM/UawThW3gmMex+MjYDv+JSeXpWTI=; b=opjsKNCwqTXqGNog6EQNPEH/tpTAElRwXYOdH8BEeDViFxGvVbdx80aj87/gUYYFwY PZwUoXAgoLOqBsAn7phKCD6ikDxTVI8+mY3QTpkHkE/XIhkzKH0udwOChkoIqhHm6xmy woUV9T0s/BQyLs9Yhnrou3f81tylAGfehaIEQWstfu46yllQRFsrAEO8Q4Tkp17LKGLo YH4XnsC9RDCW+vrtdOzwvl0+svArLM0wLywdBP43054jW2LtJlBfx4ZXk8wCOCfYigcU Owv4/obB2dXbtHtdesnHJT7oq19j09/0rTgN4OwBSeWVz7V0c8vn1Q6f8W+B7f3a9TEa WPqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=k5Auw4CczUSRUzM/UawThW3gmMex+MjYDv+JSeXpWTI=; b=mlGf/oYAOvVuHq5IAeB5L5jBLrDNP4qO6kKb6vetfPtOxt2S9Cu50epOHAEsQSNU1B k82paIEvmLkUqqHM8pD1DVV8NPfJT1fPib0fhPzbAV7d4AdtKIMnL1tFCpQ36PUXQ2gQ /2sh5wCd8TqkOpfm4Rnw8aDHAqczrXtZbX2fEnUSwE9GDRgJmsutlgIk5WanItmVvHei vr1h5G17Sd+8xzy/ZpPaneKP+FB8Fv6wrDjM9i9OeMEg5REhns2uU4meiWG0sNxsKNOX /WII0tBo6+1c3XzslnRuwiZBbpv/y/vZgpRDkXGEgEmuMCAn2V5Fb7Md3Ev54FzJR/j0 ueQQ== X-Gm-Message-State: APjAAAW9/FKgY3Ccun43BmdAMMx5ZA/y6JXV8ynoYmG7V1LXZUys2vEc K601uewqup1SM8dXRFIji9T1Vk2A X-Google-Smtp-Source: APXvYqwwq8TxOLNo+toDjo+8snN0y1UEG5LwZQ9e1CqO0w9/MZnTRDi2eaEa6XeU6JphIB86ej5xkQ== X-Received: by 2002:a1c:6755:: with SMTP id b82mr232964wmc.126.1577124928319; Mon, 23 Dec 2019 10:15:28 -0800 (PST) Original-Received: from little-buster (alyon-655-1-159-183.w90-42.abo.wanadoo.fr. [90.42.119.183]) by smtp.gmail.com with ESMTPSA id o16sm202747wmc.18.2019.12.23.10.15.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2019 10:15:27 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::331 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:122089 Archived-At: --=-=-= Content-Type: text/plain Hello, I would like to setup Emacs to look at Noto Color Emoji first, then at Symbola, for characters belonging to the "symbol" script. For a while I thought this bit of configuration worked: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (set-fontset-font t 'symbol "Symbola" nil 'prepend) (when (>=3D emacs-major-version 27) (set-fontset-font t 'symbol "Noto Color Emoji" nil 'prepend)) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Then I realized that for some reason, one specific character (=E2=9A=99 U+2= 699 GEAR) remains stubbornly displayed with DejaVu Sans Mono. I think the problem may stem from fontset-startup, but even after reading everything the manual has to say about fontsets I still feel a bit out of my depth. From emacs -Q, after running: --=-=-= Content-Type: application/emacs-lisp; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (set-fontset-font t ?=E2=9A=99 "Noto Color Emoji") (set-fontset-font "fontset-startup" ?=E2=9A=99 "Noto Color Emoji") --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable - the GEAR character is still displayed with DejaVu Sans Mono; C-u C-x =3D says: > display: by this font (glyph code) > ftcrhb:-PfEd-DejaVu Sans Mono-normal-normal-normal-*-15-*-*-*-m-0-iso= 10646-1 (#xAE4) - yet for both fontset-default and fontset-startup, M-x describe-fontset says: > =E2=9A=99 (#x2699) > -*-Noto Color Emoji-*-*-*-*-*-*-*-*-*-*-*-* - GEAR characters displayed with an italic face (e.g. with (insert (propertize "\n=E2=9A=99\n" 'font-lock-face 'italic)) ) are correctly shown with Noto Color Emoji. So far I've only had this problem with =E2=9A=99 U+2699 GEAR, though I susp= ect that any character covered by DejaVu Sans Mono would show similar symptoms. If instead, I run (set-fontset-font t ?=F0=9F=A4=B7 "Noto Color = Emoji") (i.e. using U+1F937 SHRUG) from emacs -Q, then - before running set-fontset-font, the character is displayed with Symbola; C-u C-x =3D says > display: by this font (glyph code) > ftcrhb:-UFAS-Symbola-normal-normal-semicondensed-*-15-*-*-*-*-0-iso10= 646-1 (#x2630) - after running set-fonset-font, the character is displayed with Noto Color Emoji; C-u C-x =3D says > display: by this font (glyph code) > ftcrhb:-GOOG-Noto Color Emoji-normal-normal-normal-*-15-*-*-*-m-0-iso= 10646-1 (#x9EB) - and M-x describe-fontset fontset-default says > =F0=9F=A4=B7 (#x1F937) > -*-Noto Color Emoji-*-*-*-*-*-*-*-*-*-*-*-* > [-GOOG-Noto Color Emoji-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1] (Note the third line; if I understand describe-fontset's output correctly, this means that no font was opened for U+2699 GEAR?) At this point, I don't know whether I am misunderstanding something fundamental about fontsets, or if I am facing a bug. I'm pretty sure it's the former. I don't know what else I should be looking at though=E2= =80=A6 If anyone has pointers to documentation I might have missed, that would be greatly appreciated. Cheers! (I'm not subscribed to the list; thanks for keeping me CC'ed!) --=-=-=--