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: Order of fonts returned by list-fonts Date: Sat, 08 Jan 2022 23:59:28 +0100 Message-ID: <87r19hhm0f.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="26987"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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 Jan 09 00:00:49 2022 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 1n6Khd-0006on-AX for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 09 Jan 2022 00:00:49 +0100 Original-Received: from localhost ([::1]:50050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6Khb-0007Fa-6C for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 08 Jan 2022 18:00:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6KgP-0007FC-Rk for help-gnu-emacs@gnu.org; Sat, 08 Jan 2022 17:59:34 -0500 Original-Received: from [2a00:1450:4864:20::429] (port=45781 helo=mail-wr1-x429.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n6KgO-00029i-Dg for help-gnu-emacs@gnu.org; Sat, 08 Jan 2022 17:59:33 -0500 Original-Received: by mail-wr1-x429.google.com with SMTP id q8so18758374wra.12 for ; Sat, 08 Jan 2022 14:59:30 -0800 (PST) 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=3frnV63br6wVdlUxqVVcObzGlurEDdbcFrwWFPpAeHE=; b=f3Gcjxa5UmTTrZJIg2NcrOCg9n60irLknz9PkpLevSsNfwkH0ZJistSouvRFsz9ntV t+QotmeAYwTOJeg9crTn1Hw5hQZvJeuPtakxWmBvtrMxjKYIR4j87NPB4L9NzzB859QE DRZKIY9/ra3dIF74NyWHytuv/VatjhC4f8X9Lp1MiqjaMvU658Yz1WPFSnhV4KL09G8a sswsEwpsw5uhCuwm8HlBUksZBYxjlMV/wtKsINE3qreJM/EBSLutLZ6vHeB2PylbFOsy K8JA3kq7/5LPocA2YzzRswsYe5YL9+qvHAtlUfaM0UFDH9L4TI68nJjZp+TklMQD9X1R fR6g== 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=3frnV63br6wVdlUxqVVcObzGlurEDdbcFrwWFPpAeHE=; b=CjgLJh2o9m8ujgPPkbgrXhHW8cqrhWFUxpG0Z+ly2MyFjOiLZRn6MgWd2D4dayLU6Z 9xH3P4Q4+koGzc3tUpSbYEZfxfXC6KhafBv6l2K0RjZV7n9lVCepiSEVv0QLSHUe+Bhr A95HgERlVeAz/6DsvQuXcJJF4yK2plXwrKowm4TlV8308u96wOC3Gyz5faJCNervAdzF UlGK1H2JKgw82PQm/3F3zwU9KGnIL+BEXp1wSxfccXsjZnIsBc6o9E3kwKLM689q5Y8z AE/PYyF5KxQBrV1ZcgNotJvaiXHtsXRiJKVGswCtf/axhyaipvkicmlf3Z97s5p1d6ZT zbUA== X-Gm-Message-State: AOAM5303X7eRvsCWHWIx+tupOldeSqv3CynHeZ75KYEWwWt+sEckcn/e P9aTcQ+gi2yHDuB2Uqzk5MJktLsNq8k= X-Google-Smtp-Source: ABdhPJwacI1bZD8ABk/m0f5AlYwbWNPhPxfF9PTL6ARfOW7XtwhNF15FROiorYkH/9ZwVb18LQOUjA== X-Received: by 2002:a5d:468f:: with SMTP id u15mr12072668wrq.402.1641682769485; Sat, 08 Jan 2022 14:59:29 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id f6sm2745092wri.115.2022.01.08.14.59.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jan 2022 14:59:29 -0800 (PST) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::429 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=kevin.legouguec@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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:135134 Archived-At: Hello Emacs, My distro ships with Noto Color Emoji 13.1. I have installed version 14 under ~/.local/share/fonts. fc-match seems to prioritize the latter: $ fc-match -f '%{fullname} %{file}\n' "Noto Color Emoji" > Noto Color Emoji /home/peniblec/.local/share/fonts/NotoColorEmoji.ttf Emacs, however, seems to favour the former: (find-font (font-spec :family "Noto Color Emoji")) > # normal normal 0 nil 100 0 ((:font-entity > "/usr/share/fonts/truetype/NotoColorEmoji.ttf" . 0))> (list-fonts (font-spec :family "Noto Color Emoji")) > (# normal normal 0 nil 100 0 ((:font-entity > "/usr/share/fonts/truetype/NotoColorEmoji.ttf" . 0))>=20 > # normal normal 0 nil 100 0 ((:font-entity > "/home/peniblec/.local/share/fonts/NotoColorEmoji.ttf" . 0))>) Could this be considered a bug? I didn't dig into the code yet, beside looking at font_list_entities (which led me to restart with EMACS_FONT_LOG set; unfortunately font-show-log doesn't have much to say about how font files are searched). I don't know if my expectation (that Emacs and fc-match should agree on how files are prioritized) is warranted; I know that Emacs relies on Fontconfig APIs to some degree, but I'm sure there is more complexity lurking under the hood. I figured I'd ask around if the above makes sense to someone before putting my spelunking hat on :) FWIW: I originally "solved" the problem by uninstalling the version shipped by my distro; unfortunately, today's upgrade seems to have brought it back, presumably because another package has started depending on it. FWIW=C2=B2: the bigger-picture fix would probably be to send a patch to the distro to migrate to Noto Color Emoji 14; I might get to that at some point, but I still would like to understand what's going on with Emacs. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, c= airo version 1.16.0) of 2022-01-01 built on amdahl30 Repository revision: 1d3020908b4e4ff398c3faed9321aa4932fbaad1 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101003 System Description: openSUSE Tumbleweed Configured using: 'configure --with-cairo --with-gconf --with-xinput2' Configured features: ACL CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=3Dlocal locale-coding-system: utf-8-unix