[TF2] [LINUX x64] CJK characters not working since 2025-02-18 update
Issue
Fonts are not rendering correctly since the 2025-02-18 update, JP characters and emojis are displayed as squares, the issue occurs using the default hud as well as custom ones.
Typing in chat and console also doesn't work.
System Information / Hardware
OS: Arch Linux Kernel: Linux 6.13.1-zen1-1-zen DE: KDE Plasma 6.2.5 WM: KWin (X11)
CPU: AMD Ryzen 7 5800X GPU: NVIDIA GeForce RTX 4090 Graphics driver version: 570.86.16
Filesystem: ext4
Launch parameters: mangohud %command% -novid -refresh 240 -fullscreen -nosteamcontroller -nohltv -particles 1
Screenshots
Hello @Bakeshop9358, the emoji half of this issue report is a duplicate of #5642. Let's use this issue report to focus on Japanese characters.
Same issue with chinese text
Probably the same issue as https://github.com/ValveSoftware/Source-1-Games/issues/6058.
To clarify, Windows and Linux are now consistent in terms of font rendering. However, the fonts are different between platforms. On Windows, it seems that it can fall back to system fonts, which make Asian text be correctly displayed. On Linux, the problem is probably https://github.com/ValveSoftware/Source-1-Games/issues/6058.
Since there's a decent chance that Japanese, Chinese, and Korean characters would be handled by the same fontset, I'm generalizing this issue report a bit to include all three.
#7083 identifies the exact problem causing the issue.
As a work around you can put the missing font (notosanscjk-regular) in Team Fortress 2/platform/resource/linux_fonts/ and it solves the problem. Keep in mind to make the filename lowercase. This probably fixes the emojis too, but I didn't bother trying it.
#7083 identifies the exact problem causing the issue.
As a work around you can put the missing font (notosanscjk-regular) in
Team Fortress 2/platform/resource/linux_fonts/and it solves the problem. Keep in mind to make the filename lowercase. This probably fixes the emojis too, but I didn't bother trying it.
This works, thanks! both copying the font NotoSansCJK-Medium.ttc from /usr/share/fonts/noto-cjk/ or from the Source 2013 MP SDK linux_fonts folder.
As for the emojis, with or without the workaround only some of them work, as seen in the screenshot below
https://steamdb.info/depot/441/
The font doesn't work because literally it does not exist in the game files. It's funny because the license is there, but not the font itself.
Is there a quick-fix for emojis in any way, like with the notosanscjk-regular.ttc patch-in? I've attempted to add notocoloremoji.ttf to the same directory to no avail, so either its a different file required or the game isn't looking for it anymore.
From my testing, there is no fix for emojis. I've tried some "hardcoded" methods such as forcing new fontconfig files (forcing every font to be the emoji font) without success. It seems to be something in the engine itself. We can only wait for Valve to fix it.
From my testing, there is no fix for emojis. I've tried some "hardcoded" methods such as forcing new fontconfig files (forcing every font to be the emoji font) without success. It seems to be something in the engine itself. We can only wait for Valve to fix it.
I've managed to get emojis working again but only with custom HUDs. To do this, I created this quick bash script based on this comment it requires ed, vpk_fuse and noto-fonts-emoji (and I've only tested this on arch), just place it under common/Team Fortress 2/
hash vpk_fuse 2>/dev/null || { exit 1; }
hash ed 2>/dev/null || { exit 1; }
mkdir /tmp/platform_misc
vpk_fuse platform/platform_misc_dir.vpk /tmp/platform_misc
mkdir -p tf/custom/linux_emojis/resource/
cp /tmp/platform_misc/resource/sourceschemebase.res tf/custom/linux_emojis/resource/sourceschemebase.res
umount /tmp/platform_misc
sudo chown $USER:$USER tf/custom/linux_emojis/resource/sourceschemebase.res
sudo chmod 644 tf/custom/linux_emojis/resource/sourceschemebase.res
sudo cp /usr/share/fonts/noto/NotoColorEmoji.ttf platform/resource/linux_fonts/notocoloremoji.ttf
sudo cp /usr/share/fonts/noto/NotoSans-Regular.ttf platform/resource/linux_fonts/notosans-regular.ttf
sudo chown $USER:$USER platform/resource/linux_fonts/notocoloremoji.ttf
sudo chown $USER:$USER platform/resource/linux_fonts/notosans-regular.ttf
printf '$-1i\n\t\t\"12\" \"resource/linux_fonts/notosans-regular.ttf\"\n\t\t\"13\" \"resource/linux_fonts/notocoloremoji.ttf\"\n.\nw\n' | ed -s tf/custom/linux_emojis/resource/sourceschemebase.res
the only problem left is that I get a trailing square after some characters/emojis:
maybe there's another simpler way to achieve this but this works for me.
Hmm, I didn't try sourceschemebase.res. Interesting finding. Thanks!