maple-font/README.md
2024-12-04 17:30:39 +08:00

123 lines
4.9 KiB
Markdown

> [!note]
> ### When will V7 become stable?
> It is almost stable now.
>
> As a side project during my weekends, I will release a new beta version to fix the bugs reported or encountered in my daily coding within 1-2 weeks, and do some work on the new website and build tools.
>
> If everything goes well, the stable version will be released later this year.
# Maple Mono
Maple Mono is an open source monospace font focused on smoothing your coding experience.
I create it to enhance my working experience, and hope that it can be useful to others.
## Features
- ✨ 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)
- 🎨 Icon - First-Class Nerd-Font patch support, make your terminal more vivid.
- 🔨 Customize - Enable or disable font features as you want, just make your own font.
## ScreenShots
![](https://github.com/subframe7536/maple-font/assets/78338239/19383849-6be1-4cfc-9b34-7b33fc047ecf)
- Generated by [CodeImg](https://github.com/subframe7536/vscode-codeimg)
- Theme: [Maple](https://github.com/subframe7536/vscode-theme-maple)
## Build
Clone the repo and run on your local machine. Make sure you have `python3` and `pip` installed
```shell
git clone https://github.com/subframe7536/maple-font --depth 1 -b variable
pip install foundrytools-cli
python build.py
```
- For `Ubuntu` or `Debian`, maybe `python-is-python3` is needed as well
If you have trouble installing the dependencies, just create a new Github codespace on `variable` branch and run the commands there
### Customize
You can change build config in `config.json`
- There is `--normal` option in `build.py` for common config, just like `JetBrains Mono` (with slashed zero)
- For custom `font-patcher` args, `font-forge` (and maybe `python3-fontforge` as well) is needed
#### Font Feature Freeze Options
- `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
- `disable`: Remove the features in `cvXX` / `ssXX` / `zero`, which will no longer effect, even if you enable it manually
- `ignore`: Do nothing
### Chinese version
1. Download CN base font at [Gitee release](https://gitee.com/subframe7536/Maple/releases/tag/v7.0-beta23)
2. Put them into `./source/cn`
3. Run `build.py` and **BE PATIENT**, instantiation will take about 40-50 minutes
#### Notice
The build script will auto download neccessory assets from GitHub. If you have trouble downloading, setup `github_mirror` in `config.json` or `$GITHUB` to your environment variable.
### Build Script Options
```
usage: build.py [-h] [-v] [-d] [--debug] [-n] [--feat FEAT] [--hinted]
[--no-hinted] [--liga] [--no-liga] [--cn-narrow]
[--nerd-font | --no-nerd-font] [--cn | --no-cn] [--cn-both]
[--cache] [--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
--hinted Use hinted font as base font
--no-hinted Use unhinted font as base font
--liga Preserve all the ligatures
--no-liga Remove all the ligatures
--cn-narrow Make CN characters narrow (experimental)
Build Options:
--nerd-font Build Nerd-Font version
--no-nerd-font Do not build Nerd-Font version
--cn Build Chinese version
--no-cn Do not build Chinese version
--cn-both Build both `Maple Mono CN` and `Maple Mono NF CN`. Nerd-Font
version must be enabled
--cache Reuse font cache of TTF, OTF and Woff2 formats
--archive Build font archives with config and license. If --cache is
enabled, only archive Nerd-Font and CN format
```
## Credit
- [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono)
- [Roboto Mono](https://github.com/googlefonts/RobotoMono)
- [Fira Code](https://github.com/tonsky/FiraCode)
- [Victor Mono](https://github.com/rubjo/victor-mono)
- [Commit Mono](https://github.com/eigilnikolajsen/commit-mono)
- [Code Sample](https://github.com/TheRenegadeCoder/sample-programs-website)
- [Nerd Font](https://github.com/ryanoasis/nerd-fonts)
- [Font Freeze](https://github.com/MuTsunTsai/fontfreeze/)
- [Font Viewer](https://tophix.com/font-tools/font-viewer)
- [Monolisa](https://www.monolisa.dev/)
- [Recursive](https://www.recursive.design/)
## License
SIL Open Font License 1.1