Skip to content

Instantly share code, notes, and snippets.

@atty303
Last active April 21, 2024 15:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atty303/91991d1567fe1280ba7d461a5ea7e906 to your computer and use it in GitHub Desktop.
Save atty303/91991d1567fe1280ba7d461a5ea7e906 to your computer and use it in GitHub Desktop.
Path of Exile on Steam Deck / Japanese Font Fix
import protontricks
steam_path, steam_root = protontricks.find_steam_path()
lib_paths = protontricks.get_steam_lib_paths(steam_path)
apps = protontricks.get_steam_apps(steam_root, steam_path, lib_paths)
app_id = 238960
app = [a for a in apps if a.appid == app_id]
if len(app) == 0:
raise RuntimeError(f"Failed to find steam app: {app_id}")
app = app[0]
if not app.prefix_path_exists:
raise RuntimeError(f"The prefix is not found for {app.name}. Run the app once.")
proton = protontricks.find_proton_app(steam_path, apps, app_id)
if not proton:
raise RuntimeError("Proton not found")
with open("poefont.reg", "w") as fp:
fp.write("""\
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements]
"YDSapphII Medium"="Noto Sans CJK JP"
""")
r = protontricks.run_command(None, proton, app, ["wine", "c:\\windows\\regedit.exe", "poefont.reg"])
if r == 0:
print("🚀 Done!")
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements]
"YDSapphII Medium"="Noto Sans CJK JP"
#!/bin/bash
set -euo pipefail
python -m venv /tmp/poejp
cd /tmp/poejp
bin/pip install protontricks
curl -L https://gist.githubusercontent.com/atty303/91991d1567fe1280ba7d461a5ea7e906/raw/4d5b0ece48bd16fad6007b1290845e996c7c719e/patch.py | bin/python
cd /tmp
rm -rf poejp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment