subframe7536 / maple-font
- четверг, 20 марта 2025 г. в 00:00:02
Maple Mono: Open source monospace font with round corner, ligatures and Nerd-Font for IDE and terminal, fine-grained customization options. 带连字和控制台图标的圆角等宽字体,中英文宽度完美2:1,细粒度的自定义选项
Download | Website | English | 中文
Maple Mono is an open source monospace font focused on smoothing your coding flow.
I create it to enhance my working experience, and hope that it can be useful to others.
V7 is a completely remade version, providing variable font format and source files of font project, redesigning more than half of the glyphs and offering smarter ligatures. You can checkout V6 here
@ $ % & Q ->
and cursive f i j k l x y
in italic style.features/
CN version based on Resource Han Rounded provides complete character set support for Chinese development environments, including Simplified Chinese, Traditional Chinese, and Japanese. Meanwhile, the characteristic of perfect 2:1 alignment between Chinese and English allows this font to achieve a neat, uniform, beautiful, and comfortable appearance in scenarios such as multilingual display and Markdown tables. However, the spacing of Chinese characters is larger compared to other popular Chinese fonts. See details in release notes and this issue.
You can download all the font archives from Releases.
# Add bucket
scoop bucket add nerd-fonts
# Maple Mono (ttf format)
scoop install Maple-Mono
# Maple Mono (hinted ttf format)
scoop install Maple-Mono-autohint
# Maple Mono (otf format)
scoop install Maple-Mono-otf
# Maple Mono NF
scoop install Maple-Mono-NF
# Maple Mono NF CN
scoop install Maple-Mono-NF-CN
# Maple Mono
brew install --cask font-maple-mono
# Maple Mono NF
brew install --cask font-maple-mono-nf
# Maple Mono CN
brew install --cask font-maple-mono-cn
# Maple Mono NF CN
brew install --cask font-maple-mono-nf-cn
# Maple Mono
paru -S ttf-maple-beta
# Maple Mono NF
paru -S ttf-maple-beta-nf
# Maple Mono NF CN
paru -S ttf-maple-beta-nf-cn
See in document or try it in Playground
Note
The web tool for custom build is under development.
Maple Mono
)Maple Mono NL
)--normal
preset with ligatures (Maple Mono Normal
)--normal
preset without ligatures (Maple Mono Normal NL
)-NF
suffix)-CN
suffix)-NF-CN
suffix)MapleMono-TTF-AutoHint
/ MapleMono-NF
/ MapleMono-NF-CN
, etc.MapleMono-OTF
/ MapleMono-TTF
/ MapleMono-NF-unhinted
/ MapleMono-NF-CN-unhinted
, etc.-AutoHint
and -unhinted
suffix?
-AutoHint
is only used for TTF
format.The config.json
file is used to configure the build process. Checkout the schema or document for more details.
There also have some command line options for customizing the build process. Cli options have higher priority than options in config.json
.
You can use Github Actions to build the font.
config.json
Custom Build
menu item on the leftRun workflow
button with options setupgit clone https://github.com/subframe7536/maple-font --depth 1 -b variable
docker build -t maple-font .
docker run -v "$(pwd)/fonts:/app/fonts" -e BUILD_ARGS="--normal" maple-font
Clone the repo and run on your local machine. Make sure you have python3
and pip
installed
git clone https://github.com/subframe7536/maple-font --depth 1 -b variable
pip install -r requirements.txt
python build.py
Ubuntu
or Debian
, maybe python-is-python3
is needed as wellIf you have trouble installing the dependencies, just create a new GitHub Codespace and run the commands there
For custom font-patcher
args, font-forge
(and maybe python3-fontforge
as well) is required.
Maybe you should also change "nerd_font.extra_args"
in config.json
Default args: -l --careful --outputdir dir
"nerd_font.mono"
is true
, then add --mono
Run build.py
with --normal
flag, make the font looks not such "Opinioned" , just like JetBrains Mono
(with slashed zero).
There are three kind of options for feature freeze (Why):
enable
: Forcely enable the features without setting up cvXX
/ ssXX
/ zero
in font features config, just as default glyphs / ligaturesdisable
: Remove the features in cvXX
/ ssXX
/ zero
, which will no longer effect, even if you enable it manuallyignore
: Do nothingRun build.py
with --apply-fea-file
flag, the feature file from source/features/{regular,italic}.fea
will be applied into variable font. You can modify it to change all features, e.g. remove some ligatures in calt
.
CN version is disabled by default. Run python build.py
with --cn
flag, the CN base fonts (about 130 MB) will download from GitHub.
If you want to build CN base fonts from variable (about 35 MB), setup "cn.use_static_base_font": false
in config.json and BE PATIENT, instantiation will take about 20-30 minutes.
If you think that CN glyphs spacing is tooooo large, there is a EXPERIMENTAL build option cn.narrow
or flag --cn-narrow
to narrow spacing in CN glyphs. You can see effect and track issues in #249
The build script will auto download required assets from GitHub. If you have trouble downloading, please setup github_mirror
in config.json or $GITHUB
to your environment variable. (Target URL will be https://<github_mirror>/<user>/<repo>/releases/download/<tag>/<file>
), or just download the target .zip
file and put it in the same directory as build.py
.
usage: build.py [-h] [-v] [-d] [--debug] [-n] [--feat FEAT] [--apply-fea-file]
[--hinted | --no-hinted] [--liga | --no-liga] [--cn-narrow]
[--nerd-font | --no-nerd-font] [--cn | --no-cn] [--cn-both]
[--ttf-only] [--cache] [--cn-rebuild] [--archive]
✨ Builder and optimizer for Maple Mono
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-d, --dry Output config and exit
--debug Add `Debug` suffix to family name, skip optimization
Feature Options:
-n, --normal Use normal preset, just like `JetBrains Mono` with slashed zero
--feat FEAT Freeze font features, splited by `,` (e.g. `--feat
zero,cv01,ss07,ss08`). No effect on variable format
--apply-fea-file Load feature file from `source/features/{regular,italic}.fea` to
variable font
--hinted Use hinted font as base font in NF / CN / NF-CN (default)
--no-hinted Use unhinted font as base font in NF / CN / NF-CN
--liga Preserve all the ligatures (default)
--no-liga Remove all the ligatures
--cn-narrow Make CN characters narrow (experimental)
Build Options:
--nerd-font Build Nerd-Font version (default)
--no-nerd-font Do not build Nerd-Font version
--cn Build Chinese version
--no-cn Do not build Chinese version (default)
--cn-both Build both `Maple Mono CN` and `Maple Mono NF CN`. Nerd-Font
version must be enabled
--ttf-only Only build TTF format
--cache Reuse font cache of TTF, OTF and Woff2 formats
--cn-rebuild Reinstantiate CN base font
--archive Build font archives with config and license. If has `--cache`
flag, only archive Nerd-Font and CN formats
If this font is helpful to you, please feel free to buy me a coffee
or sponser me through Afdian
SIL Open Font License 1.1