Maple Mono 字体配置:4 步装好,连字、图标、中文对齐一次搞定
【免费下载链接】maple-fontMaple Mono: Open source monospace font with round corner, ligatures and Nerd-Font icons for IDE and terminal, fine-grained customization options. 带连字和控制台图标的圆角等宽字体,中英文宽度完美2:1,细粒度的自定义选项项目地址: https://gitcode.com/GitHub_Trending/ma/maple-font
跟着这篇把 Maple Mono 字体配置走完,你能做到:挑对版本、装进系统、在 VS Code 和终端里打开连字,再顺手修掉三个高频问题。
确认你要哪个版本:别被名字绕晕
名字里的后缀决定了字符集,对应关系其实就两条线:
| 版本 | 什么时候选它 |
|---|---|
| Maple Mono | 纯英文代码,不需要图标 |
| Maple Mono NF | NF 即 Nerd Font,终端美化要图标符号 |
| Maple Mono NF CN | 中英文混排,2:1 完美对齐 |
拿不准就装 NF CN。功能最全,后面要减比加容易。
把它装上
macOS(brew):
# Maple Mono 基础版 brew install --cask font-maple-mono # 完整推荐版 brew install --cask font-maple-mono-nf-cnWindows(scoop):
scoop bucket add nerd-fonts # 装完整版 scoop install Maple-Mono-NF-CNLinux(Arch):
paru -S ttf-maplemono-nf-cn-unhinted装完直接开干前,先验证系统认没认出来:
fc-list | grep -i maple列出 Maple Mono 的字重就说明安装成功。Windows 用户在「设置 → 个性化 → 字体」里搜 Maple 确认即可。
在 VS Code 和终端里把它用起来 🛠
在 VS Code 里打开连字
连字就是把!=、->这类组合显示成一个整体符号,省眼。用户设置里加上这几行:
{ "editor.fontFamily": "Maple Mono NF CN", "editor.fontLigatures": true, "terminal.integrated.fontFamily": "Maple Mono NF CN", "editor.fontFeatureSettings": "'calt', 'cv96'" }calt是连字的总开关;cv96让引号占满全宽,中英文排版更稳。JetBrains 系列只需在 Settings → Editor → Font 里选同名字体,勾上 Enable ligatures 就行。
在 Windows Terminal 里换字体
settings.json里改字体名即可:
"font": { "face": "Maple Mono NF CN" }iTerm2、Alacritty 同理,找到字体名输入框替换成Maple Mono NF CN保存 ✨
三件最烦的事
图标显示成方框原因:装了不带 NF 的基础版,没有图标字元。 修:brew install --cask font-maple-mono-nf-cn
中英文宽度不对齐原因:选错版本或还在用旧字体。Maple Mono 中文对齐靠 CN 系列,英文占 2 格、中文占 1 格。 修:把字体名整体换成Maple Mono NF CN,重启编辑器。
连字不生效原因:编辑器没开连字开关,Maple Mono 连字设置只认fontLigatures一类配置。 修:VS Code 里editor.fontLigatures设为true,重启窗口。
让它更合身(可选)
项目根目录的config.json里可以开关nerd_font、cn等参数,自己构建字体。想要更紧凑就选 narrow 版本(宽度 550)。Web 场景直接上 WOFF2 格式。更细的特性开关见 特性文档。
装好后把 VS Code 和终端的字体改掉,再开一次连字就开干了 🚀
【免费下载链接】maple-fontMaple Mono: Open source monospace font with round corner, ligatures and Nerd-Font icons for IDE and terminal, fine-grained customization options. 带连字和控制台图标的圆角等宽字体,中英文宽度完美2:1,细粒度的自定义选项项目地址: https://gitcode.com/GitHub_Trending/ma/maple-font
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考