How can I change fonts in Bash permanently?
I followed this instruction to change my font in Bash. But it goes back every time I reopen it. How can I change fonts in Bash permanently?
Could you post a screenshot of your font property sheet? Like this?

Nice screenshot - helps explain much faster than words alone. :)

Hmm. That looks pretty normal to me. Maybe try chaging the font, then also changing one of the color values (eg make black (1, 1, 1) instead of (0, 0, 0) and then hit okay. Does opening a new bash window after that persist the font?
@Yaosen It has been a bug for Chinese people for a long time.... If your code page is in US, then the changes won't go back. However, if the codepage in 950 or 936, the changes will not persist. You can check my post #1994 for some information. And there are some work around for this -- use some 3rd emulator terminal. In #757 also has some information.
Thanks!! I don't understand what you mean. Which should I read to solve this problem? Or there is no way to solve it in bash and I have to use another app? And it does not make sense that the bug is only existing for Chinese since I bought my laptop in US and my windows is running in English as well.
Thanks
https://mailtrack.io/ Sent with Mailtrack https://mailtrack.io/install?source=signature&lang=en&[email protected]&idSignature=22
On Tue, Sep 5, 2017 at 11:40 AM, Po-wei [email protected] wrote:
@Yaosen https://github.com/yaosen It has been a bug for Chinese people for a long time.... If your code page is in US, then the changes won't go back. However, if the codepage in 950 or 936, the changes will not persist. You can check my post #1994 https://github.com/Microsoft/BashOnWindows/issues/1994 for some information. And there are some work around for this -- use some 3rd emulator terminal. In #757 https://github.com/Microsoft/BashOnWindows/issues/757 also has some information.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/BashOnWindows/issues/2463#issuecomment-327265603, or mute the thread https://github.com/notifications/unsubscribe-auth/AUAQXVTKRjZSmtcfaYbLYBGflJGPOck2ks5sfZWEgaJpZM4PITpj .
I have been struggling with the issue for a long time but I solved it today. My code page is 936 and I know that to solve the issue simply, I just need a font that supports the charset CP936 like SimSun. I tried some of combined fonts in Chinese and Western characters, but all didn't work. They have CP936 characters but they may not declare support for CP936 in font meta. So I cannot find them in CMD and PowerShell property. Only find in Bash property but not permanently.
But just now, I found "Microsoft YaHei Mono". You don't need any extra action, just install it, and then select this font in the Bash property. Then the font will never change again.
Download: Microsoft YaHei Mono.zip or CSDN
The font = Microsoft YaHei + Consolas
Chinese Simplified Version (中文版):
我被这个问题困扰很久了,不过今天终于解决了。我的系统代码页是936,我知道要简单的解决这个问题,我只需要找到一款像新宋体那样支持CP936字符集的字体就好。不过,我尝试过好几个中英文混合字体,但是都没有用。这些混合字体确实有CP936的字符,但是我怀疑它们没有在字体元信息里声明支持CP936。所以我在CMD和PowerShell属性里面都看不到这些字体,只有在Bash属性里能看到,但是无法持久保存字体设置。
直到刚才,我发现了“Microsoft YaHei Mono”。不需要进行任何额外的操作,只需要安装这款字体,然后在Bash的属性里面启用它就OK了。从此以后字体再也不会变成默认的了。
下载:Microsoft YaHei Mono.zip 或 CSDN
该字体 = 微软雅黑 + Consolas
It works!!!! Thanks so much!!
@zadjii-msft Exactly the same issue occurs on Korean version too. I think the font fallback need to be implemented locally (not for the whole text) and temporary.
This issue was moved to Microsoft/console#84
I found a situation :
- I set a powerline font
- quit ubuntu bash and re-enter
- the font setting is keeped
- vim powerline theme worked very well

- tmux powerline theme was broken
- after some test , I quit tmux , suddenly found the font settings changed !
- vim powerline theme became broken too .

This is a weird behavior.
Oh, my fault . I above pic is vim in tmux. So, the problem is why enter tmux would change terminal font to default ?
@eromoe if you use the font which has right code page, that problem will solve, too.
Yeah, you are right.
In my case quit and reopen bash didn't break the font DejavuSansMono NF, it became 新宋体 after entering tmux.
Change to Microsoft YaHei Mono , enter tmux , the font is keeped.
But the problem is that Microsoft YaHei Mono isn't a powerline font ...
Is there any way to add the code page to a certain font ?
@eromoe , There probably exist some methods, however, solving these issues just took me too much time. I suggest to use terminal emulator (e.g. Wsltty) which behave as expected.
I think I just figured out how it could be addressed without installing new font.
Go to Control Panel - Clock, Language & Region - Locales - Region - Administrative - Language for non-Unicode programs - Change system locale, there you click on the Beta checkbox, after a reboot my WSL terminal finally got my font settings right! I tried tmux, vim, vim in tmux, etc., all functioned well.
My OS version is Windows 10 profesional, version 1809, 17763.529.
中文:前往 控制面板 - 时钟和区域 - 区域 - 管理 - 非Unicode程序的语言 - 更改系统区域设置,勾选“Beta版:使用Unicode UTF-8提供全球语言支持”,重启后WSL字体就不会再混乱了。测试过tmux,vim,tmux中使用vim,都没有出现字体回滚的问题。
Locking this issue as it was closed after it was moved to the Console/Terminal project over a year ago. Please review & continue the conversation in the moved issue.