2024-08-10 07:27:36 +00:00
> [!note]
> ### When will V7 become stable?
2025-02-02 11:35:30 +00:00
> It is already stable. The V7.0-beta36 is the stable version.
2024-08-10 07:27:36 +00:00
>
2025-02-02 11:35:30 +00:00
> The reason for retaining the "beta" suffix is to remind everyone that the landing page and the web tool for visualized configuration and custom build is still under development.
2024-08-10 07:27:36 +00:00
>
2025-02-02 11:35:30 +00:00
> If everything goes well, the stable version will be released before March.
2024-06-09 13:26:31 +00:00
2025-01-22 02:08:12 +00:00

2024-12-09 12:51:40 +00:00
2024-12-04 09:30:39 +00:00
# Maple Mono
2024-03-16 15:50:07 +00:00
2024-12-18 06:15:11 +00:00
Maple Mono is an open source monospace font focused on smoothing your coding flow.
2024-12-04 09:30:39 +00:00
I create it to enhance my working experience, and hope that it can be useful to others.
2023-04-23 06:37:32 +00:00
2024-12-19 07:42:52 +00:00
V7 is a completely remade version, providing variable font, redesigning more than half of the glyphs and offering smarter ligatures. You can checkout V6 [here ](https://github.com/subframe7536/maple-font/tree/main )
2024-12-07 16:09:58 +00:00
2024-12-03 14:51:50 +00:00
## Features
2024-12-04 09:30:39 +00:00
- ✨ Variable - Infinity font weights with fine-grained italic glyphs.
- ☁️ Smooth - Round corner, brand-new glyph of `@ $ % & Q ->` and cursive `f i j k l x y` in italic style.
- 💪 Useful - Large amount of smart ligatures, see in [`features/` ](./source/features/README.md )
2024-12-04 16:27:07 +00:00
- 🎨 Icon - First-Class [Nerd-Font ](https://github.com/ryanoasis/nerd-fonts ) support, make your terminal more vivid.
2024-12-04 09:30:39 +00:00
- 🔨 Customize - Enable or disable font features as you want, just make your own font.
2024-12-03 14:51:50 +00:00
2024-12-25 11:54:21 +00:00
### Simpified Chinese, Traditional Chinese and Japanese
2024-12-27 05:48:13 +00:00
The CN version contails the glyphs of simplified and traditional Chinese, and Japanese, which are not as normal as most CN fonts. The CJK glyphs' spacing is much looser for better metric alignment, see details in [release notes ](https://github.com/subframe7536/maple-font/releases/tag/cn-base ) and [this issue ](https://github.com/subframe7536/maple-font/issues/211 ).
2024-12-25 11:54:21 +00:00
2025-01-22 02:08:12 +00:00

2024-12-25 11:54:21 +00:00
2024-12-03 14:51:50 +00:00
## ScreenShots
2024-02-07 16:13:40 +00:00
2025-01-22 02:08:12 +00:00

2024-06-30 12:33:03 +00:00
2024-10-12 15:01:36 +00:00
- Generated by [CodeImg ](https://github.com/subframe7536/vscode-codeimg )
2024-07-09 08:48:01 +00:00
- Theme: [Maple ](https://github.com/subframe7536/vscode-theme-maple )
2025-02-26 06:20:51 +00:00
- Config: font size 16px, line height 1.8, default letter spacing
2024-06-09 12:27:13 +00:00
2024-12-07 17:03:18 +00:00
## Download
You can download all the font archives from [Releases ](https://github.com/subframe7536/maple-font/releases ).
2025-02-17 08:26:58 +00:00
### Homebrew (MacOS, Linux)
```sh
# 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
```
2024-12-07 17:03:18 +00:00
### Arch Linux
```shell
2025-02-23 00:07:04 +00:00
# Maple Mono
2024-12-07 17:03:18 +00:00
paru -S ttf-maple-beta
2025-02-23 00:07:04 +00:00
# Maple Mono NF
paru -S ttf-maple-beta-nf
# Maple Mono NF CN
paru -S ttf-maple-beta-nf-cn
2024-12-07 17:03:18 +00:00
```
2025-02-02 11:35:30 +00:00
## Feature Configurations
See in [document ](./source/features/README.md#features )
> [!note]
> The web tool for visualized configuration and custom build is under development.
2024-12-07 16:09:58 +00:00
## Naming FAQ
### Features
2024-12-07 18:00:31 +00:00
- **Ligature**: Default version with ligatures (`Maple Mono`)
- **No-Ligature**: Default version without ligatures (`Maple Mono NL`)
- **Normal-Ligature**: [`--normal` preset ](#preset ) with ligatures (`Maple Mono Normal`)
- **Normal-No-Ligature**: [`--normal` preset ](#preset ) without ligatures (`Maple Mono Normal NL`)
2024-12-07 16:09:58 +00:00
### Format and Glyph Set
- **Variable**: Minimal version, smoothly change font weight by variable
- **TTF**: Minimal version, ttf format [Recommend!]
- **OTF**: Minimal version, otf format
- **WOFF2**: Minimal version, woff2 format, for small size on web pages
2024-12-08 09:00:00 +00:00
- **NF**: Nerd-Font patched version, add icons for terminal (With `-NF` suffix)
- **CN**: Chinese version, embed with Chinese and Japanese glyphs (With `-CN` suffix)
- **NF-CN**: Full version, embed with icons, Chinese and Japanese glyphs (With `-NF-CN` suffix)
2024-12-07 16:09:58 +00:00
### Font Hint
2024-12-18 06:15:11 +00:00
- **Hinted font** is used for low resolution screen to have better render effect. From my experience, if your screen resolution is lower or equal than 1080P, it is recommended to use "hinted font". Using "unhinted font" will lead to misalignment or uneven thickness on your text.
2024-12-07 16:09:58 +00:00
- In this case, you can choose `MapleMono-TTF-AutoHint` / `MapleMono-NF` / `MapleMono-NF-CN` , etc.
2024-12-18 06:15:11 +00:00
- **Unhinted font** is used for high resolution screen (e.g. for MacBook). Using "hinted font" will blur your text or make it looks weird.
2024-12-07 16:09:58 +00:00
- In this case, you can choose `MapleMono-OTF` / `MapleMono-TTF` / `MapleMono-NF-unhinted` / `MapleMono-NF-CN-unhinted` , etc.
2024-12-07 18:00:31 +00:00
- Why there exists `-AutoHint` and `-unhinted` suffix?
- for backward compatibility, I keep the original naming scheme. `-AutoHint` is only used for `TTF` format.
2024-12-07 16:09:58 +00:00
2024-12-28 13:10:05 +00:00
## CDN
2024-12-25 13:43:39 +00:00
2024-12-28 13:10:05 +00:00
### Maple Mono
2024-12-31 13:21:47 +00:00
- [fontsource ](https://fontsource.org/fonts/maple-mono )
2024-12-28 13:10:05 +00:00
- [ZeoSeven Fonts ](https://fonts.zeoseven.com/items/443/ )
### Maple Mono CN
- [The Chinese Web Fonts Plan (中文网字计划) ](https://chinese-font.netlify.app/zh-cn/fonts/maple-mono-cn/MapleMono-CN-Regular )
- [ZeoSeven Fonts ](https://fonts.zeoseven.com/items/442/ )
2024-12-25 13:43:39 +00:00
2024-12-07 16:09:58 +00:00
## Custom Build
2024-04-17 01:41:54 +00:00
2025-02-02 11:35:30 +00:00
The [`config.json` ](./config.json ) file is used to configure the build process. Checkout the [schema ](./source/schema.json ) or [document ](./source/features/README.md ) for more details.
2024-12-07 16:55:15 +00:00
2024-12-14 08:32:25 +00:00
There also have some [command line options ](#build-script-usage ) for customizing the build process. Cli options have higher priority than options in `config.json` .
2024-12-08 06:01:57 +00:00
### Use Github Actions
You can use [Github Actions ](https://github.com/subframe7536/maple-font/actions/workflows/custom.yml ) to build the font.
2024-12-07 16:55:15 +00:00
1. Fork the repo
2. (Optional) Change the content in `config.json`
3. Go to Actions tab
4. Click on `Custom Build` menu item on the left
5. Click on `Run workflow` button with options setup
6. Wait for the build to finish
7. Download the font archives from Releases
2024-12-18 06:15:11 +00:00
### Use Docker
2024-12-07 16:55:15 +00:00
```shell
git 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
```
2024-12-08 06:01:57 +00:00
### Local Build
2024-12-07 16:55:15 +00:00
2024-10-12 15:01:36 +00:00
Clone the repo and run on your local machine. Make sure you have `python3` and `pip` installed
2024-07-28 05:05:01 +00:00
```shell
git clone https://github.com/subframe7536/maple-font --depth 1 -b variable
2024-12-07 16:55:15 +00:00
pip install -r requirements.txt
2024-07-28 05:05:01 +00:00
python build.py
```
2024-04-21 14:26:27 +00:00
2024-10-12 15:01:36 +00:00
- For `Ubuntu` or `Debian` , maybe `python-is-python3` is needed as well
2024-04-21 14:26:27 +00:00
2024-12-14 08:32:25 +00:00
If you have trouble installing the dependencies, just create a new GitHub Codespace and run the commands there
2024-04-21 14:26:27 +00:00
2024-12-08 06:01:57 +00:00
#### Custom Nerd-Font
For custom `font-patcher` args, `font-forge` (and maybe `python3-fontforge` as well) is required.
2024-04-21 09:44:25 +00:00
2024-12-14 08:32:25 +00:00
Maybe you should also change `"nerd_font.extra_args"` in [config.json ](./config.json )
2024-08-10 02:41:47 +00:00
2024-12-07 16:09:58 +00:00
#### Preset
Add `--normal` flag in `build.py` for common config, make the font just like `JetBrains Mono` (with slashed zero).
2024-12-07 16:55:15 +00:00
#### Font Feature Freeze
2024-10-14 06:21:26 +00:00
2024-12-14 08:32:25 +00:00
There are three kind of options for feature freeze:
1. `enable` : Move ligature rules to `calt` , which will enable the features without setting up `cvXX` / `ssXX` / `zero` in font features config, just as default ligatures
2. `disable` : Remove the features in `cvXX` / `ssXX` / `zero` , which will no longer effect, even if you enable it manually
3. `ignore` : Do nothing
2024-10-14 06:21:26 +00:00
2024-12-27 04:53:53 +00:00
#### Load Custom Feature File
Run `build.py` with `--apply-fea-file` flag, the feature file from [`source/features/{regular,italic}.fea` ](./source/features ) will be applied into variable font. You can modify it to change all features, e.g. remove some ligatures in `calt` .
2024-08-10 02:41:47 +00:00
2024-12-27 04:53:53 +00:00
### Chinese version
2024-12-25 11:54:21 +00:00
2025-01-05 04:31:51 +00:00
Run `python build.py --cn` , the CN base fonts (about 130 MB) will download from GitHub.
2024-12-04 16:27:07 +00:00
If you want to build CN base fonts from variable (about 35 MB), setup `"cn.use_static_base_font": false` in [config.json ](./config.json ) and **BE PATIENT** , instantiation will take about 40-50 minutes.
2024-04-17 01:41:54 +00:00
2025-02-19 05:49:08 +00:00
#### Narrow spacing in CN glyphs
If you does not care about spacing, 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
2025-01-05 04:31:51 +00:00
#### GitHub Mirror
2024-10-13 13:49:20 +00:00
2025-01-31 15:39:14 +00:00
The build script will auto download necessary assets from GitHub. If you have trouble downloading, please setup `github_mirror` in [config.json ](./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` .
2024-10-13 13:49:20 +00:00
2024-12-07 16:55:15 +00:00
### Build Script Usage
2024-08-24 12:42:30 +00:00
2024-12-03 14:51:50 +00:00
```
2025-01-07 02:01:13 +00:00
usage: build.py [-h] [-v] [-d] [--debug] [-n] [--feat FEAT] [--apply-fea-file]
[--hinted | --no-hinted] [--liga | --no-liga] [--cn-narrow]
2025-02-19 03:22:40 +00:00
[--nerd-font | --no-nerd-font] [--cn | --no-cn] [--cn-both]
[--ttf-only] [--cache] [--cn-rebuild] [--archive]
2024-12-03 14:51:50 +00:00
✨ Builder and optimizer for Maple Mono
options:
2024-12-27 04:53:53 +00:00
-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
2024-12-03 14:51:50 +00:00
Feature Options:
2024-12-27 04:53:53 +00:00
-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
2025-02-19 03:22:40 +00:00
--hinted Use hinted font as base font in NF / CN / NF-CN (default)
2025-02-19 03:13:15 +00:00
--no-hinted Use unhinted font as base font in NF / CN / NF-CN
2025-02-19 03:22:40 +00:00
--liga Preserve all the ligatures (default)
2024-12-27 04:53:53 +00:00
--no-liga Remove all the ligatures
--cn-narrow Make CN characters narrow (experimental)
2024-12-03 14:51:50 +00:00
Build Options:
2025-02-19 03:22:40 +00:00
--nerd-font Build Nerd-Font version (default)
2024-12-27 04:53:53 +00:00
--no-nerd-font Do not build Nerd-Font version
--cn Build Chinese version
2025-02-19 03:22:40 +00:00
--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
2025-02-19 03:13:15 +00:00
--ttf-only Only build TTF format
2024-12-27 04:53:53 +00:00
--cache Reuse font cache of TTF, OTF and Woff2 formats
2025-01-07 02:01:13 +00:00
--cn-rebuild Reinstantiate CN base font
2025-02-19 03:22:40 +00:00
--archive Build font archives with config and license. If has `--cache`
flag, only archive Nerd-Font and CN formats
2024-08-24 12:42:30 +00:00
```
2024-09-29 08:06:56 +00:00
## Credit
2023-04-23 06:31:25 +00:00
2024-10-12 15:01:36 +00:00
- [JetBrains Mono ](https://github.com/JetBrains/JetBrainsMono )
2023-12-25 16:36:15 +00:00
- [Roboto Mono ](https://github.com/googlefonts/RobotoMono )
- [Fira Code ](https://github.com/tonsky/FiraCode )
2024-04-17 01:41:54 +00:00
- [Victor Mono ](https://github.com/rubjo/victor-mono )
2024-02-19 15:31:18 +00:00
- [Commit Mono ](https://github.com/eigilnikolajsen/commit-mono )
- [Code Sample ](https://github.com/TheRenegadeCoder/sample-programs-website )
2024-03-16 15:50:07 +00:00
- [Nerd Font ](https://github.com/ryanoasis/nerd-fonts )
2024-09-29 08:06:56 +00:00
- [Font Freeze ](https://github.com/MuTsunTsai/fontfreeze/ )
- [Font Viewer ](https://tophix.com/font-tools/font-viewer )
2024-12-04 09:30:39 +00:00
- [Monolisa ](https://www.monolisa.dev/ )
2024-09-29 08:06:56 +00:00
- [Recursive ](https://www.recursive.design/ )
2023-04-23 06:31:25 +00:00
2022-08-06 05:58:45 +00:00
## License
SIL Open Font License 1.1