CJK characters become invisible for GTK4 applications without `gtk-font-hint-metrics` in cairo 1.17.8
This issue was first raised in other places. Therefore, I will copy the text I wrote to save time.
From https://gitlab.gnome.org/GNOME/gtk/-/issues/5582:
Recently, I did a full upgrade by running
sudo pacman -Syu
. After that, I find that all GTK4 applications do not display CJK characters (they appear empty). Details. After some digging, I found the root of the issue: GTK4 doesn't use font metrics by default. I must appendgtk-hint-font-metrics=true
to section[Settings]
of file~/.config/gtk-4.0/settings.ini
for it to work properly. Deleting this file will also make CJK characters disappear.
After some digging, I found that this problem only appears when using cairo 1.17.8: https://gitlab.gnome.org/GNOME/gtk/-/issues/5582#note_1666409