環(huán)境:Windows10 64bit;MATLAB R2015b
注:MATLAB中找不到系統(tǒng)新安裝的字體旨剥,參考https://blog.csdn.net/happyangry/article/details/102598717
1. 下載自定義字體
Consolas YaHei hybrid 字體:
https://github.com/yakumioto/YaHei-Consolas-Hybrid-1.12/archive/master.zip
Consolas-with-Yahei 字體:
https://github.com/crvdgc/Consolas-with-Yahei/archive/master.zip
推薦Consolas-with-Yahei咧欣,有常規(guī)、斜體轨帜、粗體魄咕、粗斜體四種字體
2. 安裝為系統(tǒng)字體
選中下載的字體文件 *.ttf 右鍵選擇”為所有用戶安裝“,這樣在MATLAB中才可以看到
3. 設(shè)為MATLAB桌面代碼字體
打開(kāi) MATLAB R2015b 英文版蚌父,找到 HOME==>Preferences==>MATLAB==>Fonts哮兰,設(shè)置 Desktop code font 為 YaHei Consolas hybrid 或者 Consolas-with-Yahei 即可。
R2015benfonts.JPG
中文版可大致參考下圖設(shè)置
R2017bcnfonts.JPG
其他版本的請(qǐng)參考鏈接1苟弛、2官網(wǎng)文檔喝滞。
效果
fontresult.JPG
補(bǔ)充
推薦 Consolas-with-Yahei 字體,其保持了Consolas字體的風(fēng)格膏秫,又添加了YaHei的CJK字體右遭,兼容中日韓字符;而 Consolas YaHei hybrid 字體偏向于YaHei字體風(fēng)格缤削,既好看又不好看窘哈,有些字符區(qū)分度不大,不過(guò)版本較高僻他,應(yīng)該會(huì)比較穩(wěn)定宵距,不會(huì)出現(xiàn)亂碼問(wèn)題。
參考鏈接:
- https://ww2.mathworks.cn/help/matlab/matlab_env/change-fonts.html
- https://ww2.mathworks.cn/help/matlab/matlab_env/change-fonts.html?lang=en
- https://blog.csdn.net/qq_30835655/article/details/77435883
- https://blog.csdn.net/WhoisPo/article/details/50383362
- https://github.com/crvdgc/Consolas-with-Yahei
- https://github.com/yakumioto/YaHei-Consolas-Hybrid-1.12
- https://blog.csdn.net/happyangry/article/details/102598717