Last active
March 5, 2021 17:01
-
-
Save tsukumijima/24f9dd2e35ed792b063e65fea6d89ea9 to your computer and use it in GitHub Desktop.
VSCode (Windows) の UI フォントを変更するツール(設定を環境に合わせて変更してください)
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
@echo off | |
python %~dp0\VSCodeUIFontChanger.py |
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
# ***** 設定 ***** | |
# 変更するフォント名 | |
font = 'Meiryo' | |
# VSCode のパス | |
vscode_path = r'C:\Applications\Microsoft VS Code' | |
# ***** 設定ここまで ***** | |
# 置換対象のファイルのパス | |
replace_files = [ | |
vscode_path + r'\resources\app\out\vs\workbench\workbench.desktop.main.css', | |
vscode_path + r'\resources\app\out\vs\workbench\workbench.desktop.main.js', | |
vscode_path + r'\resources\app\out\vs\code\electron-sandbox\processExplorer\processExplorerMain.css', | |
vscode_path + r'\resources\app\out\vs\code\electron-sandbox\issue\issueReporterMain.css', | |
] | |
for replace_file in replace_files: | |
# ファイルを開く | |
with open(replace_file, mode = 'r', encoding = 'utf-8') as file: | |
replace = file.read() | |
# 文字列置換 | |
replace = replace.replace('Yu Gothic UI', font) | |
# ファイルに書き込み | |
with open(replace_file, mode = 'w', encoding = 'utf-8') as file: | |
file.write(replace) | |
print('Replaced ' + replace_file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment