[arch-general] Odd unicode glyph rendering issues
Hello! I have two systems here that are running the same version of Arch. They are using different window managers; system A is running awesomewm, whilst system B is running fvwm. Both have the same fonts installed, and both have very similar outputs for "env": System A: DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/184135848/bus DISPLAY=:0 EDITOR=/usr/bin/vim FREETYPE_PROPERTIES=truetype:interpreter-version=35 HOME=/home/rm LANG=en_GB.UTF-8 LC_COLLATE=C LOGNAME=rm MAIL=/var/spool/mail/rm MOTD_SHOWN=pam PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/rm/bin:/opt/bin PWD=/home/rm SHELL=/bin/bash SHLVL=2 SSH_AGENT_PID=806 SSH_AUTH_SOCK=/tmp/ssh-XXXXXXNocNEG/agent.782 SYSTEMD_EXEC_PID=673 TASKRC=/home/rm/git/com.github/io7m/dotfiles.taskwarrior/taskrc TERM=xterm-256color USER=rm VTE_VERSION=6602 WINDOWID=12195960 WINDOWPATH=1 XAUTHORITY=/home/rm/.Xauthority XDG_CACHE_HOME=/home/rm/var/cache XDG_CONFIG_HOME=/home/rm/etc XDG_DATA_HOME=/home/rm/local XDG_RUNTIME_DIR=/run/user/184135848 XDG_SEAT=seat0 XDG_SESSION_CLASS=user XDG_SESSION_ID=1 XDG_SESSION_TYPE=tty XDG_VTNR=1 _=/usr/bin/env System B: DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/128542918/bus EDITOR=/usr/bin/vim FREETYPE_PROPERTIES=truetype:interpreter-version=35 HOME=/home/rm-work LANG=en_GB.UTF-8 LC_COLLATE=C LOGNAME=rm-work MAIL=/var/spool/mail/rm-work MOTD_SHOWN=pam PATH=/home/rm-work/bin:/home/rm-work/.pyenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PWD=/home/rm-work PYENV_ROOT=/home/rm-work/.pyenv PYENV_VIRTUALENV_INIT=1 SHELL=/bin/bash SHLVL=0 TERM=xterm-256color USER=rm-work XDG_CACHE_HOME=/home/rm-work/var/cache XDG_CONFIG_HOME=/home/rm-work/etc XDG_DATA_HOME=/home/rm-work/local XDG_RUNTIME_DIR=/run/user/128542918 XDG_SESSION_CLASS=user XDG_SESSION_ID=16 XDG_SESSION_TYPE=tty _=/usr/sbin/env With both systems, I can open a text file containing the following string: ひらがな ... in both a browser (Firefox, Chromium), in mousepad, and in vim in an xfce4-terminal instance. System A will consistently render the string using the correct glyphs. System B will consistently render the string as a set of missing glyphs. Given that all of my software, fonts, and locale settings are apparently the same... What other variables could cause font rendering to consistently fail on one system and not the other? -- Mark Raynsford | https://www.io7m.com
What about the list of installed packages? Are there any notable differences? Maybe make a diff on the output of pacman -Q :)
Hi,
What about the list of installed packages? Are there any notable differences? Maybe make a diff on the output of pacman -Q :)
Also, compare the output of fc-list(1) on each machine? -- Cheers, Ralph.
On 2022-04-04T15:48:54 +0200 LuKaRo via arch-general <arch-general@lists.archlinux.org> wrote:
What about the list of installed packages? Are there any notable differences? Maybe make a diff on the output of pacman -Q :)
Nothing notable, in this case, however... On 2022-04-04T15:59:29 +0100 Ralph Corderoy via arch-general <arch-general@lists.archlinux.org> wrote:
Hi,
What about the list of installed packages? Are there any notable differences? Maybe make a diff on the output of pacman -Q :)
Also, compare the output of fc-list(1) on each machine?
It looks like this might be the culprit. I aggressively went through the working machine and removed any font that wasn't present on the non-working machine. Now, neither machine works! So now the issue is that even though both machines have been configured to use the same font all along, clearly the one that _was_ working was falling back to some other font for the glyphs the selected font didn't have. I'm not sure if there's a sane way to find out what exactly was happening there. Ideally I'd like both machines to work. -- Mark Raynsford | https://www.io7m.com
Hi Mark,
Also, compare the output of fc-list(1) on each machine?
It looks like this might be the culprit. I aggressively went through the working machine and removed any font that wasn't present on the non-working machine. Now, neither machine works!
Progress! How did you remove the fonts from the working machine? Delete pacman packages containing them? Have you a record of what you removed?
So now the issue is that even though both machines have been configured to use the same font all along
No, it sounds like the same search for a font was configured on both and the search resulted in a different font. Have you perused https://wiki.archlinux.org/title/Fonts ?
clearly the one that _was_ working was falling back to some other font for the glyphs the selected font didn't have.
Or it was choosing a different font to the non-working machine for the same search criteria.
I'm not sure if there's a sane way to find out what exactly was happening there. Ideally I'd like both machines to work.
Get the working one working once again and see what matches against the search criteria configured in the program. fc-match(1) can be helpful. -- Cheers, Ralph.
Hello! On 2022-04-04T17:51:30 +0100 Ralph Corderoy via arch-general <arch-general@lists.archlinux.org> wrote:
No, it sounds like the same search for a font was configured on both and the search resulted in a different font. Have you perused https://wiki.archlinux.org/title/Fonts ?
Success! It turns out there was an old copy of IBM Plex Sans lurking in one of the directories that fontconfig inspects (revealed by fc-cache). It resulted in this on the working machine: $ fc-match -s ':charset=3072' IBMPlexSansJP-Regular.ttf: "IBM Plex Sans JP" "Regular" DejaVuSans.ttf: "DejaVu Sans" "Book" DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold" DejaVuSans-Oblique.ttf: "DejaVu Sans" "Oblique" DejaVuSans-BoldOblique.ttf: "DejaVu Sans" "Bold Oblique" NimbusSans-Regular.otf: "Nimbus Sans" "Regular" IBMPlexSans-Regular.ttf: "IBM Plex Sans" "Regular" DejaVuMathTeXGyre.ttf: "DejaVu Math TeX Gyre" "Regular" DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book" DejaVuSerif.ttf: "DejaVu Serif" "Book" LiberationMono-Regular.ttf: "Liberation Mono" "Regular" LiberationSerif-Regular.ttf: "Liberation Serif" "Regular" SourceCodePro-Regular.otf: "Source Code Pro" "Regular" D050000L.otf: "D050000L" "Regular" IBMPlexSansArabic-Regular.ttf: "IBM Plex Sans Arabic" "Regular" IBMPlexSansDevanagari-Regular.ttf: "IBM Plex Sans Devanagari" "Regular" IBMPlexSansThai-Regular.ttf: "IBM Plex Sans Thai" "Regular" IBMPlexSansKR-Regular.ttf: "IBM Plex Sans KR" "Regular" Cantarell-VF.otf: "Cantarell" "Regular" DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold" DejaVuSerif-Bold.ttf: "DejaVu Serif" "Bold" DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic" LiberationSerif-Italic.ttf: "Liberation Serif" "Italic" $ fc-match -s ':charset=3072' DejaVuSans.ttf: "DejaVu Sans" "Book" DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold" DejaVuSans-Oblique.ttf: "DejaVu Sans" "Oblique" DejaVuSans-BoldOblique.ttf: "DejaVu Sans" "Bold Oblique" NimbusSans-Regular.otf: "Nimbus Sans" "Regular" DejaVuMathTeXGyre.ttf: "DejaVu Math TeX Gyre" "Regular" DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book" DejaVuSerif.ttf: "DejaVu Serif" "Book" LiberationMono-Regular.ttf: "Liberation Mono" "Regular" LiberationSerif-Regular.ttf: "Liberation Serif" "Regular" SourceCodePro-Regular.otf: "Source Code Pro" "Regular" D050000L.otf: "D050000L" "Regular" Cantarell-VF.otf: "Cantarell" "Regular" DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold" DejaVuSerif-Bold.ttf: "DejaVu Serif" "Bold" DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic" LiberationSerif-Italic.ttf: "Liberation Serif" "Italic" Looks like I was getting Hiragana glyphs from Plex, but every other character was being rendered using DejaVuSans. Both machines had been configured to use "DejaVuSans Mono Book 9" for years, but DejaVu doesn't contain many CJK glyphs. Thanks for prodding me in the right direction! -- Mark Raynsford | https://www.io7m.com
On Mon, 4 Apr 2022 13:38:35 +0000 Mark Raynsford via arch-general <arch-general@lists.archlinux.org> wrote:
Hello!
I have two systems here that are running the same version of Arch. They are using different window managers; system A is running awesomewm, whilst system B is running fvwm.
Both have the same fonts installed, and both have very similar outputs for "env":
System A:
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/184135848/bus DISPLAY=:0 EDITOR=/usr/bin/vim FREETYPE_PROPERTIES=truetype:interpreter-version=35 HOME=/home/rm LANG=en_GB.UTF-8 LC_COLLATE=C LOGNAME=rm MAIL=/var/spool/mail/rm MOTD_SHOWN=pam PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/rm/bin:/opt/bin PWD=/home/rm SHELL=/bin/bash SHLVL=2 SSH_AGENT_PID=806 SSH_AUTH_SOCK=/tmp/ssh-XXXXXXNocNEG/agent.782 SYSTEMD_EXEC_PID=673 TASKRC=/home/rm/git/com.github/io7m/dotfiles.taskwarrior/taskrc TERM=xterm-256color USER=rm VTE_VERSION=6602 WINDOWID=12195960 WINDOWPATH=1 XAUTHORITY=/home/rm/.Xauthority XDG_CACHE_HOME=/home/rm/var/cache XDG_CONFIG_HOME=/home/rm/etc XDG_DATA_HOME=/home/rm/local XDG_RUNTIME_DIR=/run/user/184135848 XDG_SEAT=seat0 XDG_SESSION_CLASS=user XDG_SESSION_ID=1 XDG_SESSION_TYPE=tty XDG_VTNR=1 _=/usr/bin/env
System B:
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/128542918/bus EDITOR=/usr/bin/vim FREETYPE_PROPERTIES=truetype:interpreter-version=35 HOME=/home/rm-work LANG=en_GB.UTF-8 LC_COLLATE=C LOGNAME=rm-work MAIL=/var/spool/mail/rm-work MOTD_SHOWN=pam PATH=/home/rm-work/bin:/home/rm-work/.pyenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PWD=/home/rm-work PYENV_ROOT=/home/rm-work/.pyenv PYENV_VIRTUALENV_INIT=1 SHELL=/bin/bash SHLVL=0 TERM=xterm-256color USER=rm-work XDG_CACHE_HOME=/home/rm-work/var/cache XDG_CONFIG_HOME=/home/rm-work/etc XDG_DATA_HOME=/home/rm-work/local XDG_RUNTIME_DIR=/run/user/128542918 XDG_SESSION_CLASS=user XDG_SESSION_ID=16 XDG_SESSION_TYPE=tty _=/usr/sbin/env
With both systems, I can open a text file containing the following string:
ひらがな
... in both a browser (Firefox, Chromium), in mousepad, and in vim in an xfce4-terminal instance. System A will consistently render the string using the correct glyphs. System B will consistently render the string as a set of missing glyphs.
Given that all of my software, fonts, and locale settings are apparently the same... What other variables could cause font rendering to consistently fail on one system and not the other?
If you use gnome terminal instead of xfce4-terminal and can reproduce the same symptoms, then the command: $ gsettings get org.gnome.desktop.interface monospace-font-name will tell you what font is in use on each machine. Maybe that will help?
participants (4)
-
Dave Howorth
-
LuKaRo
-
Mark Raynsford
-
Ralph Corderoy