No description
Find a file
2024-12-08 00:55:15 +08:00
.github add namingFAQ 2024-12-08 00:12:15 +08:00
source Make release CI works (#291) 2024-12-07 23:32:53 +08:00
woff2/var update woff2 2024-10-27 19:49:39 +08:00
.gitattributes test gitattributes 2024-03-08 14:44:57 +08:00
.gitignore add font source script 2024-12-05 21:14:02 +08:00
build.py Make release CI works (#291) 2024-12-07 23:32:53 +08:00
build_base_nf.py determine the built-in NF base font range #289 2024-12-05 00:08:54 +08:00
config.json upgrade Nerd-Font to 3.3.0 2024-12-04 22:27:12 +08:00
Dockerfile Add dockerfile 2024-12-08 00:55:15 +08:00
fontsource.py add font source script 2024-12-05 21:14:02 +08:00
OFL.txt add source 2022-08-05 00:00:28 +08:00
README.md Add dockerfile 2024-12-08 00:55:15 +08:00
requirements.txt Add dockerfile 2024-12-08 00:55:15 +08:00

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.

You can checkout old version here

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/
  • 🎨 Icon - First-Class Nerd-Font support, make your terminal more vivid.
  • 🔨 Customize - Enable or disable font features as you want, just make your own font.

ScreenShots

Naming FAQ

Features

  • Ligature: Default version with ligatures
  • No-Ligature: Default version without ligatures
  • Normal-Ligature: --normal preset with ligatures
  • Normal-No-Ligature: --normal preset without ligatures

Format and Glyph Set

  • Variable: Minimal version, smoothly change font weight by variable
  • TTF: Minimal version, ttf format [Recommend!]
  • TTF-AutoHint: Minimal version, ttf format with hint, better for low resolution monitor
  • OTF: Minimal version, otf format
  • WOFF2: Minimal version, woff2 format, for small size on web pages
  • NF: Nerd-Font patched version, add icons for terminal
  • CN: Chinese version, embed with Chinese and Japanese glyphs
  • NF-CN: Full version, embed with icon, Chinese and Japanese glyphs

Font Hint

  • 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".
    • In this case, you can choose MapleMono-TTF-AutoHint / MapleMono-NF / MapleMono-NF-CN, etc.
  • Unhinted font is used for high resolution screen (e.g. for Mac), when using "hinted font", it will blur your text or make it looks weird.
    • In this case, you can choose MapleMono-OTF / MapleMono-TTF / MapleMono-NF-unhinted / MapleMono-NF-CN-unhinted, etc.

Custom Build

Github Actions

You can use Github Actions to build the font.

  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

Docker

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

Local

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
  • 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

Options

You can change build config in config.json

  • For custom font-patcher args, font-forge (and maybe python3-fontforge as well) is needed

Preset

Add --normal flag in build.py for common config, make the font just like JetBrains Mono (with slashed zero).

Font Feature Freeze

  • 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

Run python build.py --cn, the CN base fonts (about 135 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 40-50 minutes.

Notice

The build script will auto download neccessory 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})

Build Script Usage

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] [--ttf-only] [--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
  --ttf-only      Only build unhinted TTF format
  --cache         Reuse font cache of TTF, OTF and Woff2 formats
  --archive       Build font archives with config and license. If has `--cache` flag,
                  only archive Nerd-Font and CN formats

Credit

License

SIL Open Font License 1.1