Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deck] Tofu Issue with CJK Languages in Steam #153

Closed
szescxz opened this issue Aug 16, 2023 · 4 comments
Closed

[Deck] Tofu Issue with CJK Languages in Steam #153

szescxz opened this issue Aug 16, 2023 · 4 comments

Comments

@szescxz
Copy link

szescxz commented Aug 16, 2023

Only affects Steam, in both Game Mode and Desktop Mode.

More info: ValveSoftware/steam-for-linux#9418

Workaround (for some reason it does not work for Korean and also the update screen before entering Game Mode):

$ rpm-ostree override remove google-noto-sans-cjk-vf-fonts
$ rpm-ostree install google-noto-sans-cjk-fonts
@szescxz szescxz changed the title [Deck] Tofu Issues with CJK Languages in Steam. [Deck] Tofu Issue with CJK Languages in Steam Aug 16, 2023
@KyleGospo
Copy link
Member

Thank you!
c87d9fe

@szescxz
Copy link
Author

szescxz commented Aug 29, 2023

Located the fix for the tofus on Steam update screen ("Steam Bootstrapper") as well - I believe Valve has hardcoded the path to the font files. Game Mode is CEF-based so doesn't have such issue (and actually uses the correct region-specific glpyh).

$ strings $HOME/.local/share/Steam/ubuntu12_32/steam

Search for CJK in the output for a quick proof. Read on for digged details after reverse engineering.


In addition to $HOME/.steam/root//tenfoot/resource/fonts/tenfoot.uifont (sic) and /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf (see also negativo17/steamos-base-files#1), Steam is expecting one of these font files:

NotoSansCJK-Medium.ttc
NotoSansCJK-Light.ttc
NotoSansCJK-Regular.ttc # <- looking for this one first

under either of the following path:

/usr/share/fonts/noto-cjk # <- path used in Arch Linux (including SteamOS 3.x)
/usr/share/fonts/opentype/noto # <- path used in Debian-based distros

Working PoC:

$ sudo ostree admin unlock
$ sudo ln -s /usr/share/fonts/google-noto-sans-cjk-fonts /usr/share/fonts/noto-cjk

@KyleGospo
Copy link
Member

7dd9580

@szescxz
Copy link
Author

szescxz commented Nov 8, 2023

@KyleGospo
Things are broken again in F39. I believe patches applied to F38 in ublue-os/main#334 needs to be applied to F39 as well.

  • Right now Droid Sans Fallback (provided by google-droid-sans-fonts) gets picked by the Game Mode UI; fine with Chinese and Japanese but still broken with Korean
  • Symlink I proposed is broken on F39 as google-noto-sans-cjk-fonts is not installed, causing the tofus on the Steam Bootstrapper screen again

Fixed by rpm-ostree install google-noto-sans-cjk-fonts; no need to remove any packages (google-noto-sans-cjk-vf-fonts is already removed, and even not installable on my device).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants