这是一个真实发生在我刚入职新公司调教新电脑时的故事:
This is a real story on my first day in new company while I was installing softwares on the new laptop:
根据新电脑的显示尺寸,我修改了一下As的显示字体大小,但手一抖索多输入了一个数字变成了三位数的字体大小。
Accroding to the size of screen, I adjust the Ui font in setting. But unexpectly miss input one more number, and made the font size value over hundreds.
结果,整个应用变得无法正常显示,也无法正常操作,并且即使我卸载重装也无法将这个尺寸数值变回最初的默认值。
So, the whole Android Studio became unable to show info properly nether be operated fuctionally. And what's more, the process of unintall and reintsall still can't make it to initial status.
经过将近一个小时不断寻找,最终在一篇StackOverFlow上的大致找到的解决方案,具体链接如下:
After over an hour searching on net, finally found a solution in StackOverFlow, the link is below:
Huge unusable font size in Android Studio - Stack Overflow
不过因为它提供的是Windows上的路径,而我工作中使用的电脑为mac,于是额外找了一下mac上的对应路径,
Well, the solution provids only the config file path on Windows system, but the laptop of mine is a mac. So, I need to get to know the right path for mac system.
https://developer.android.com/studio/intro/studio-config?hl=zh-cn
"
Windows
语法:%APPDATA%\Google\<product><version>
示例:C:\Users\YourUserName\AppData\Roaming\Google\AndroidStudio4.1
macOS
语法:~/Library/Application Support/Google/<product><version>
示例:~/Library/Application Support/Google/AndroidStudio4.1
Linux
语法:~/.config/Google/<product><version>
示例:~/.config/Google/AndroidStudio4.1
"
解决的要素已经集齐,按解决方式,进入对应的路径找到ui.Inf.xml文件(如我的mac中对应的为“~/Library/Application Support/Google/AndroidStudio2022.3/options”),修改或者增加字体的配置键值对<option name="FONT_SIZE" value="14" />进ui.Inf.xml文件即可。
Now all is needed is here. And what I need to do is to find the file path to ui.Inf.xml(mine is “~/Library/Application Support/Google/AndroidStudio2022.3/options”). And adding or modifying the content of into ui.Inf.xml to make it contains "<option name="FONT_SIZE" value="14" />" is final step.