From: "Simen Endsjø" <contact@simendsjo.me>
To: help-guix@gnu.org
Subject: Different/incorrect font chosen -- fontconfig not deterministic?
Date: Sun, 05 Jan 2025 09:39:28 +0100 [thread overview]
Message-ID: <87o70lslhb.fsf@simendsjo.me> (raw)
[-- Attachment #1: Type: text/plain, Size: 5866 bytes --]
I’m having problems where the wrong/different font is chosen on one
computer even though my setup should be the same.
On my first system, Material Icons font is chosen, but on the second
system, Symbols Nerd Font and GNU Unifont is chosen.
I copied my old operating-system configuration and only did minor tweaks
to support the new system (e.g. change hostname), but the font setup is
the same. I also use the exact same home-environment and the same emacs
configuration.
Material Icons is added by emacs `all-the-icons-install-fonts' and added
to `~/.local/share/fonts/material-design-icons.ttf'. This file exist on
both systems. fc-list shows this font too.
So I’m guessing fontconfig is not deterministic in some way here.
`fc-cache -fr' doesn’t help, and I’ve tried rebuilding the system, home
and rebooted too.
Char 1 () shows a different icon than intended as Nerd and Material
uses different symbols for the character.
First system - correct:
┌────
│ position: 57 of 1659 (3%), column: 0
│ character: (displayed as ) (codepoint 59576, #o164270, #xe8b8)
│ charset: unicode-bmp (Unicode Basic Multilingual Plane (U+0000..U+FFFF))
│ code point in charset: 0xE8B8
│ syntax: w which means: word
│ category: L:Strong L2R
│ to input: type "C-x 8 RET e8b8"
│ buffer code: #xEE #xA2 #xB8
│ file code: #xEE #xA2 #xB8 (encoded by coding system utf-8-unix)
│ display: by this font (glyph code):
│ ftcrhb:-unknown-Material Icons-regular-normal-normal-*-24-*-*-*-m-0-iso10646-1 (#x34A)
│
│ Character code properties: customize what to show
│ general-category: Co (Other, Private Use)
│ decomposition: (59576) ('')
└────
Second system - incorrect/different:
┌────
│ position: 50 of 53 (92%), column: 0
│ character: (displayed as ) (codepoint 59576, #o164270, #xe8b8)
│ charset: unicode-bmp (Unicode Basic Multilingual Plane (U+0000..U+FFFF))
│ code point in charset: 0xE8B8
│ syntax: w which means: word
│ category: L:Strong L2R
│ to input: type "C-x 8 RET e8b8"
│ buffer code: #xEE #xA2 #xB8
│ file code: #xEE #xA2 #xB8 (encoded by coding system utf-8-unix)
│ display: by this font (glyph code):
│ ftcrhb:-PfEd-Symbols Nerd Font Mono-regular-normal-normal-*-24-*-*-*-m-0-iso10646-1 (#x448)
│
│ Character code properties: customize what to show
│ general-category: Co (Other, Private Use)
│ decomposition: (59576) ('')
└────
Char 2 () choose a font which doesn’t have this character at all, so it
renders as E5 D9.
First system – correct:
┌────
│ position: 1649 of 2449 (67%), column: 0
│ character: (displayed as ) (codepoint 58841, #o162731, #xe5d9)
│ charset: unicode-bmp (Unicode Basic Multilingual Plane (U+0000..U+FFFF))
│ code point in charset: 0xE5D9
│ syntax: w which means: word
│ category: L:Strong L2R, j:Japanese
│ to input: type "C-x 8 RET e5d9"
│ buffer code: #xEE #x97 #x99
│ file code: #xEE #x97 #x99 (encoded by coding system utf-8-unix)
│ display: by this font (glyph code):
│ ftcrhb:-unknown-Material Icons-regular-normal-normal-*-24-*-*-*-m-0-iso10646-1 (#x27D)
│
│ Character code properties: customize what to show
│ general-category: Co (Other, Private Use)
│ decomposition: (58841) ('')
└────
Second system – incorrect font chosen:
┌────
│ position: 859 of 891 (96%), column: 0
│ character: (displayed as ) (codepoint 58841, #o162731, #xe5d9)
│ charset: unicode-bmp (Unicode Basic Multilingual Plane (U+0000..U+FFFF))
│ code point in charset: 0xE5D9
│ syntax: w which means: word
│ category: L:Strong L2R, j:Japanese
│ to input: type "C-x 8 RET e5d9"
│ buffer code: #xEE #x97 #x99
│ file code: #xEE #x97 #x99 (encoded by coding system utf-8-unix)
│ display: by this font (glyph code):
│ ftcrhb:-GNU -Unifont Sample-regular-normal-normal-*-24-*-*-*-d-0-iso10646-1 (#xDDD8)
│
│ Character code properties: customize what to show
│ general-category: Co (Other, Private Use)
│ decomposition: (58841) ('')
└────
The fonts in fc-list lists the fonts in different order on the two
systems, which is probably the reason why it picks different fonts on
the two systems, but it doesn’t explain why it picks a font which
doesn’t have the symbol…?
┌────
│ fc-list | grep -i material
└────
First (correct) system:
┌────
│ ~/.local/share/fonts/material-design-icons.ttf: Material Icons:style=Regular
│ ~/.guix-home/profile/share/fonts/web/MaterialIcons-Regular.woff: Material Icons:style=Regular
│ ~/.guix-home/profile/share/fonts/truetype/MaterialIcons-Regular.ttf: Material Icons:style=Regular
└────
Second (incorrect) system:
┌────
│ ~/.guix-home/profile/share/fonts/web/MaterialIcons-Regular.woff: Material Icons:style=Regular
│ ~/.local/share/fonts/material-design-icons.ttf: Material Icons:style=Regular
│ ~/.guix-home/profile/share/fonts/truetype/MaterialIcons-Regular.ttf: Material Icons:style=Regular
└────
What is the correct way to make the systems deterministic? And only
choose a font which has symbols defined? And choose the preferred fonts
in different situations?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 515 bytes --]
next reply other threads:[~2025-01-05 8:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-05 8:39 Simen Endsjø [this message]
2025-01-05 12:22 ` Different/incorrect font chosen -- fontconfig not deterministic? Marek Paśnikowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o70lslhb.fsf@simendsjo.me \
--to=contact@simendsjo.me \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).