curl -L https://bit.ly/poejp2 | bash
Last active
April 21, 2024 15:48
-
-
Save atty303/91991d1567fe1280ba7d461a5ea7e906 to your computer and use it in GitHub Desktop.
Path of Exile on Steam Deck / Japanese Font Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements] | |
"YDSapphII Medium"="Noto Sans CJK JP" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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