From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Unicode fonts not correctly displayed Date: Tue, 17 Oct 2023 14:07:32 +0300 Message-ID: <83mswho6bv.fsf@gnu.org> References: <87h6mptymc.fsf@schmidbauer.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31367"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 17 13:08:50 2023 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 1qshwQ-0007w8-Ip for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 17 Oct 2023 13:08:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qshvs-0007AQ-TX; Tue, 17 Oct 2023 07:08:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qshve-0006zE-IP for help-gnu-emacs@gnu.org; Tue, 17 Oct 2023 07:08:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qshve-0003RU-6V for help-gnu-emacs@gnu.org; Tue, 17 Oct 2023 07:08:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=C44XmFtScUtrlGYeBSe+DsS1i3KrzWnjmY3rvE5P29M=; b=LLkdYn4DhnbPWs7mZ5yO KCW8V6udfHHdKkCKoLrB8gtMar3SxAsceFyoH5nbRP5v+NVLkePHRGMIMw0kRUSKx0toAkv5YOwFa SlDvjhgY6Y2JDVKzKdM8rNGdoV+eMseqxAjoAXiPfoZ+RtYNJvicJgdH17+/3aawfv1pBuNXApZHK YUvmdhKMRHG0+xU1L3E8WxxrBeGEPC4dpHWPDmYyHjRaWJXjgOna3YJfk1Gr4UkNOXsgX8vsP2cPQ 9tgoYqc/G9NLSFmlEsZjYFO/2i+V9yeXiCReIBFHS+VErW2CH68vpBFNTrx5imzPjKb4430NhsH6e 85Djp/ypqV94bg==; In-Reply-To: <87h6mptymc.fsf@schmidbauer.cc> (message from Toni Schmidbauer on Tue, 17 Oct 2023 10:48:07 +0200) 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145303 Archived-At: > From: Toni Schmidbauer > Date: Tue, 17 Oct 2023 10:48:07 +0200 > > (when (member "JetBrainsMono Nerd Font" (font-family-list)) > (set-face-attribute 'default nil :font "JetBrainsMonoNerdFont") > (set-frame-font 'default "JetBrainsMonoNerdFont 20") > (set-face-font 'default "JetBrainsMonoNerdFont 20") > (set-face-font 'variable-pitch "JetBrainsMonoNerdFont 20")) It is not recommended to set the fonts of both the 'default' and the 'variable-pitch' faces to the same font. They are supposed to look differently, and the font used for the latter face is not supposed to be monospaced. > ;; Emoji: 😄, 🤦, 🏴󠁧󠁢󠁳󠁣󠁴󠁿 > (set-fontset-font t 'symbol "Segoe UI Emoji" nil 'append) > (set-fontset-font t 'symbol "Segoe UI Symbol" nil 'append) > (set-fontset-font t 'symbol "Noto Color Emoji" nil 'append) If you want to set fonts for the 'symbol' pseudo-script, you should set use-default-font-for-symbols to the nil value. And why do you specify multiple fonts for the same range of characters? That is also not recommended. Pick on font and stick to it. > ;; should include 2b22 > (set-fontset-font t 'symbol "Symbola" nil 'append) This should not be necessary if you really have Symbola installed, since Emacs configures the default fontset to use Symbola for the 2B00 block. > emoji's are rendered ok but the unicode glyph u002b22, which should be > part of the Symbola font does not render (emacs displays 2b22). > > when i run what-cursor-position with a prefix arg i get the following > information: > > ======== > position: 874 of 1186 (74%), restriction: <40-1187>, column: 21 > character: ⬢ (displayed as ⬢) (codepoint 11042, #o25442, #x2b22) > charset: unicode (Unicode (ISO10646)) > code point in charset: 0x2B22 > script: symbol > syntax: _ which means: symbol > category: .:Base > to input: type "C-x 8 RET 2b22" or "C-x 8 RET BLACK HEXAGON" > buffer code: #xE2 #xAC #xA2 > file code: #xE2 #xAC #xA2 (encoded by coding system utf-8-unix) > display: no font available > > Character code properties: customize what to show > name: BLACK HEXAGON > general-category: So (Symbol, Other) > decomposition: (11042) ('⬢') > > There is an overlay here: > From 853 to 887 > face hl-line > priority -50 > window # > > > There are text properties here: > fontified t > ======== > > so it tells me "no font available". i'm really struggling to understand > why... Because your font configuration is, how should I put it? messy... I suggest to start from "emacs -Q" and only add non-default font settings if the defaults don't work well. (Assuming you use a recent Emacs version; you didn't say.)