Convert Figma logo to code with AI

subframe7536 logomaple-font

Maple Mono: Open source monospace font with round corner, ligatures and Nerd-Font icons for IDE and terminal, fine-grained customization options. 带连字和控制台图标的圆角等宽字体,中英文宽度完美2:1,细粒度的自定义选项

17,862
594
17,862
6

Top Related Projects

An unprofessional open-source Chinese font derived from Fontworks' Klee One. 一款非专业的开源中文字体,基于 FONTWORKS 出品字体 Klee One 衍生。

Sarasa Gothic / 更纱黑体 / 更紗黑體 / 更紗ゴシック / 사라사 고딕

Source Han Sans | 思源黑体 | 思源黑體 | 思源黑體 香港 | 源ノ角ゴシック | 본고딕

Noto CJK fonts

Quick Overview

Maple Font is a CJK (Chinese, Japanese, Korean) programming font project that aims to provide a clean, readable typeface for coding. It combines Latin characters from the JetBrains Mono font with CJK glyphs from the Source Han Sans font, creating a harmonious blend for multilingual programming environments.

Pros

  • Optimized for coding with clear, distinguishable characters
  • Supports a wide range of CJK characters alongside Latin script
  • Open-source and freely available for use
  • Regular updates and maintenance by the community

Cons

  • May not be suitable for non-programming text display
  • Limited customization options compared to some other programming fonts
  • Potential rendering issues on certain operating systems or text editors
  • Requires manual installation and configuration in most development environments

Getting Started

To use Maple Font in your development environment:

  1. Visit the Maple Font GitHub repository
  2. Download the font files from the "Releases" section
  3. Install the font on your system (method varies by operating system)
  4. Configure your text editor or IDE to use Maple Font
    • For VS Code, add "editor.fontFamily": "Maple Mono" to your settings.json
    • For other editors, refer to their documentation on changing the font

Note: Specific installation and configuration steps may vary depending on your operating system and development environment.

Competitor Comparisons

An unprofessional open-source Chinese font derived from Fontworks' Klee One. 一款非专业的开源中文字体,基于 FONTWORKS 出品字体 Klee One 衍生。

Pros of LxgwWenKai

  • More comprehensive character set, including traditional and simplified Chinese
  • Wider range of weights and styles available
  • Larger community and more frequent updates

Cons of LxgwWenKai

  • Less focus on programming-specific glyphs and ligatures
  • May not be as optimized for code readability as Maple-font

Code Comparison

While both fonts are primarily designed for text display rather than coding, here's a brief comparison of how they might appear in code:

LxgwWenKai:

def 计算面积(,):
    return*print(计算面积(5, 3))

Maple-font:

def calculate_area(length, width):
    return length * width

print(calculate_area(5, 3))

The main difference in this example is the support for Chinese characters in function and variable names, which LxgwWenKai handles well. Maple-font, while not specifically designed for Chinese, focuses more on clear distinction between similar characters and programming ligatures.

Both fonts aim to improve readability, but they cater to slightly different use cases. LxgwWenKai is more versatile for general text and multilingual documents, while Maple-font may have an edge in coding environments, especially for Latin script users.

Sarasa Gothic / 更纱黑体 / 更紗黑體 / 更紗ゴシック / 사라사 고딕

Pros of Sarasa-Gothic

  • Supports a wider range of CJK (Chinese, Japanese, Korean) characters
  • Offers multiple weight variations and regional variants
  • Has a larger and more active community, with frequent updates

Cons of Sarasa-Gothic

  • Larger file size due to extensive character support
  • May have more complex installation and configuration process
  • Could be overwhelming for users who only need basic CJK support

Code Comparison

While both projects are font repositories and don't typically include code samples, we can compare their configuration files:

Maple-font (subset.json):

{
  "CJK": ["JP", "KR", "SC", "TC"],
  "Latin": ["Latin-1"]
}

Sarasa-Gothic (build-plans.toml):

[buildPlans.sarasa-gothic]
family = "Sarasa Gothic"
spacing = "normal"
serifs = "sans"

These snippets demonstrate the different approaches to font configuration and customization in each project. Maple-font uses a JSON file to specify character subsets, while Sarasa-Gothic employs a TOML file for more detailed build plans.

Source Han Sans | 思源黑体 | 思源黑體 | 思源黑體 香港 | 源ノ角ゴシック | 본고딕

Pros of Source Han Sans

  • Extensive language support for East Asian scripts (Chinese, Japanese, Korean)
  • Developed by Adobe, ensuring high-quality typography and professional design
  • Large community and widespread adoption in various projects

Cons of Source Han Sans

  • Larger file size due to comprehensive character set
  • May require more system resources for rendering
  • Less suitable for specific design preferences or niche use cases

Code Comparison

While both projects are font repositories, they don't typically include code samples. However, here's an example of how to use each font in CSS:

Maple Font:

@font-face {
  font-family: 'Maple Font';
  src: url('path/to/maple-font.woff2') format('woff2');
}

Source Han Sans:

@font-face {
  font-family: 'Source Han Sans';
  src: url('path/to/source-han-sans.otf') format('opentype');
}

Additional Notes

Maple Font is a more specialized font project, focusing on a specific aesthetic and use case. It may be preferred for projects requiring a unique look or lighter file size. Source Han Sans, on the other hand, is a comprehensive solution for East Asian typography, making it ideal for multilingual projects or applications requiring broad language support.

Noto CJK fonts

Pros of Noto CJK

  • Comprehensive coverage of CJK (Chinese, Japanese, Korean) characters
  • Developed by Google, ensuring wide compatibility and regular updates
  • Multiple weights and styles available for versatile typography

Cons of Noto CJK

  • Large file size due to extensive character set
  • May not have specialized programming ligatures or coding-specific features
  • Less focus on aesthetic customization for coding environments

Code Comparison

While both fonts can be used in coding environments, Maple Font is specifically designed for programming, potentially offering better readability for code. Here's a simple comparison:

Noto CJK:

body {
  font-family: 'Noto Sans CJK', sans-serif;
  font-size: 14px;
}

Maple Font:

body {
  font-family: 'Maple Font', monospace;
  font-size: 14px;
}

The main difference lies in the font family and the default fallback (sans-serif vs. monospace). Maple Font may provide better alignment and distinction between similar characters in code, while Noto CJK offers broader language support for general text.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Cover

subframe7536%2Fmaple-font | Trendshift Featured|HelloGitHub

GitHub Repo Stars GitHub Repo Forks X (formerly Twitter) Follow

GitHub Release GitHub Downloads (all assets, all releases) GitHub Repo License GitHub Repo Issues

Download | Website | English | 中文 | 日本語

Maple Mono

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

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.

Simpified Chinese, Traditional Chinese and Japanese

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.

2-1.png

ScreenShots

showcase.png

  • Pictured by CodeImg
  • Theme: Maple
  • Config: font size 16px, line height 1.8, default letter spacing

Download

You can download all the font archives from Releases.

Scoop (Windows)

# Add bucket
scoop bucket add nerd-fonts
# Maple Mono (ttf format)
scoop install Maple-Mono
# Maple Mono NF
scoop install Maple-Mono-NF
# Maple Mono NF CN
scoop install Maple-Mono-NF-CN
All packages (Click to expand)
# 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

Homebrew (MacOS, Linux)

# Maple Mono
brew install --cask font-maple-mono
# Maple Mono NF
brew install --cask font-maple-mono-nf
# Maple Mono NF CN
brew install --cask font-maple-mono-nf-cn
All packages (Click to expand)
# 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 Normal
brew install --cask font-maple-mono-normal
# Maple Mono Normal NF
brew install --cask font-maple-mono-normal-nf
# Maple Mono Normal CN
brew install --cask font-maple-mono-normal-cn
# Maple Mono Normal NF CN
brew install --cask font-maple-mono-normal-nf-cn

Arch Linux

ArchLinuxCN repository allows downloading a single package zip file without downloading all the package zip files in pkgbase, but AUR does not. (If you have a good solution, please contact Cyberczy(czysheep@gmail.com))

ArchLinuxCN (Recommended)

# Maple Mono (Ligature TTF unhinted)
paru -S ttf-maplemono
# Maple Mono NF (Ligature unhinted)
paru -S ttf-maplemono-nf-unhinted
# Maple Mono NF CN (Ligature unhinted)
paru -S ttf-maplemono-nf-cn-unhinted
All packages (Click to expand)
# Maple Mono (Ligature Variable)
paru -S ttf-maplemono-variable
# Maple Mono (Ligature TTF hinted)
paru -S ttf-maplemono-autohint
# Maple Mono (Ligature TTF unhinted)
paru -S ttf-maplemono
# Maple Mono (Ligature OTF)
paru -S otf-maplemono
# Maple Mono (Ligature WOFF2)
paru -S woff2-maplemono
# Maple Mono NF (Ligature hinted)
paru -S ttf-maplemono-nf
# Maple Mono NF (Ligature unhinted)
paru -S ttf-maplemono-nf-unhinted
# Maple Mono CN (Ligature hinted)
paru -S ttf-maplemono-cn
# Maple Mono CN (Ligature unhinted)
paru -S ttf-maplemono-cn-unhinted
# Maple Mono NF CN (Ligature hinted)
paru -S ttf-maplemono-nf-cn
# Maple Mono NF CN (Ligature unhinted)
paru -S ttf-maplemono-nf-cn-unhinted

# Maple Mono (No-Ligature Variable)
paru -S ttf-maplemononl-variable
# Maple Mono (No-Ligature TTF hinted)
paru -S ttf-maplemononl-autohint
# Maple Mono (No-Ligature TTF unhinted)
paru -S ttf-maplemononl
# Maple Mono (No-Ligature OTF)
paru -S otf-maplemononl
# Maple Mono (No-Ligature WOFF2)
paru -S woff2-maplemononl
# Maple Mono NF (No-Ligature hinted)
paru -S ttf-maplemononl-nf
# Maple Mono NF (No-Ligature unhinted)
paru -S ttf-maplemononl-nf-unhinted
# Maple Mono CN (No-Ligature hinted)
paru -S ttf-maplemononl-cn
# Maple Mono CN (No-Ligature unhinted)
paru -S ttf-maplemononl-cn-unhinted
# Maple Mono NF CN (No-Ligature hinted)
paru -S ttf-maplemononl-nf-cn
# Maple Mono NF CN (No-Ligature unhinted)
paru -S ttf-maplemononl-nf-cn-unhinted

# Maple Mono Normal (Ligature Variable)
paru -S ttf-maplemononormal-variable
# Maple Mono Normal (Ligature TTF hinted)
paru -S ttf-maplemononormal-autohint
# Maple Mono Normal (Ligature TTF unhinted)
paru -S ttf-maplemononormal
# Maple Mono Normal (Ligature OTF)
paru -S otf-maplemononormal
# Maple Mono Normal (Ligature WOFF2)
paru -S woff2-maplemononormal
# Maple Mono Normal NF (Ligature hinted)
paru -S ttf-maplemononormal-nf
# Maple Mono Normal NF (Ligature unhinted)
paru -S ttf-maplemononormal-nf-unhinted
# Maple Mono Normal CN (Ligature hinted)
paru -S ttf-maplemononormal-cn
# Maple Mono Normal CN (Ligature unhinted)
paru -S ttf-maplemononormal-cn-unhinted
# Maple Mono Normal NF CN (Ligature hinted)
paru -S ttf-maplemononormal-nf-cn
# Maple Mono Normal NF CN (Ligature unhinted)
paru -S ttf-maplemononormal-nf-cn-unhinted

# Maple Mono Normal (No-Ligature Variable)
paru -S ttf-maplemononormalnl-variable
# Maple Mono Normal (No-Ligature TTF hinted)
paru -S ttf-maplemononormalnl-autohint
# Maple Mono Normal (No-Ligature TTF unhinted)
paru -S ttf-maplemononormalnl
# Maple Mono Normal (No-Ligature OTF)
paru -S otf-maplemononormalnl
# Maple Mono Normal (No-Ligature WOFF2)
paru -S woff2-maplemononormalnl
# Maple Mono Normal NF (No-Ligature hinted)
paru -S ttf-maplemononormalnl-nf
# Maple Mono Normal NF (No-Ligature unhinted)
paru -S ttf-maplemononormalnl-nf-unhinted
# Maple Mono Normal CN (No-Ligature hinted)
paru -S ttf-maplemononormalnl-cn
# Maple Mono Normal CN (No-Ligature unhinted)
paru -S ttf-maplemononormalnl-cn-unhinted
# Maple Mono Normal NF CN (No-Ligature hinted)
paru -S ttf-maplemononormalnl-nf-cn
# Maple Mono Normal NF CN (No-Ligature unhinted)
paru -S ttf-maplemononormalnl-nf-cn-unhinted

AUR (Not Recommended)

# Maple Mono (Ligature TTF unhinted)
paru -S maplemono-ttf
# Maple Mono NF (Ligature unhinted)
paru -S maplemono-nf-unhinted
# Maple Mono NF CN (Ligature unhinted)
paru -S maplemono-nf-cn-unhinted
All packages (Click to expand)
# Maple Mono (Ligature Variable)
paru -S maplemono-variable
# Maple Mono (Ligature TTF hinted)
paru -S maplemono-ttf-autohint
# Maple Mono (Ligature TTF unhinted)
paru -S maplemono-ttf
# Maple Mono (Ligature OTF)
paru -S maplemono-otf
# Maple Mono (Ligature WOFF2)
paru -S maplemono-woff2
# Maple Mono NF (Ligature hinted)
paru -S maplemono-nf
# Maple Mono NF (Ligature unhinted)
paru -S maplemono-nf-unhinted
# Maple Mono CN (Ligature hinted)
paru -S maplemono-cn
# Maple Mono CN (Ligature unhinted)
paru -S maplemono-cn-unhinted
# Maple Mono NF CN (Ligature hinted)
paru -S maplemono-nf-cn
# Maple Mono NF CN (Ligature unhinted)
paru -S maplemono-nf-cn-unhinted

# Maple Mono (No-Ligature Variable)
paru -S maplemononl-variable
# Maple Mono (No-Ligature TTF hinted)
paru -S maplemononl-ttf-autohint
# Maple Mono (No-Ligature TTF unhinted)
paru -S maplemononl-ttf
# Maple Mono (No-Ligature OTF)
paru -S maplemononl-otf
# Maple Mono (No-Ligature WOFF2)
paru -S maplemononl-woff2
# Maple Mono NF (No-Ligature hinted)
paru -S maplemononl-nf
# Maple Mono NF (No-Ligature unhinted)
paru -S maplemononl-nf-unhinted
# Maple Mono CN (No-Ligature hinted)
paru -S maplemononl-cn
# Maple Mono CN (No-Ligature unhinted)
paru -S maplemononl-cn-unhinted
# Maple Mono NF CN (No-Ligature hinted)
paru -S maplemononl-nf-cn
# Maple Mono NF CN (No-Ligature unhinted)
paru -S maplemononl-nf-cn-unhinted

# Maple Mono Normal (Ligature Variable)
paru -S maplemononormal-variable
# Maple Mono Normal (Ligature TTF hinted)
paru -S maplemononormal-ttf-autohint
# Maple Mono Normal (Ligature TTF unhinted)
paru -S maplemononormal-ttf
# Maple Mono Normal (Ligature OTF)
paru -S maplemononormal-otf
# Maple Mono Normal (Ligature WOFF2)
paru -S maplemononormal-woff2
# Maple Mono Normal NF (Ligature hinted)
paru -S maplemononormal-nf
# Maple Mono Normal NF (Ligature unhinted)
paru -S maplemononormal-nf-unhinted
# Maple Mono Normal CN (Ligature hinted)
paru -S maplemononormal-cn
# Maple Mono Normal CN (Ligature unhinted)
paru -S maplemononormal-cn-unhinted
# Maple Mono Normal NF CN (Ligature hinted)
paru -S maplemononormal-nf-cn
# Maple Mono Normal NF CN (Ligature unhinted)
paru -S maplemononormal-nf-cn-unhinted

# Maple Mono Normal (No-Ligature Variable)
paru -S maplemononormalnl-variable
# Maple Mono Normal (No-Ligature TTF hinted)
paru -S maplemononormalnl-ttf-autohint
# Maple Mono Normal (No-Ligature TTF unhinted)
paru -S maplemononormalnl-ttf
# Maple Mono Normal (No-Ligature OTF)
paru -S maplemononormalnl-otf
# Maple Mono Normal (No-Ligature WOFF2)
paru -S maplemononormalnl-woff2
# Maple Mono Normal NF (No-Ligature hinted)
paru -S maplemononormalnl-nf
# Maple Mono Normal NF (No-Ligature unhinted)
paru -S maplemononormalnl-nf-unhinted
# Maple Mono Normal CN (No-Ligature hinted)
paru -S maplemononormalnl-cn
# Maple Mono Normal CN (No-Ligature unhinted)
paru -S maplemononormalnl-cn-unhinted
# Maple Mono Normal NF CN (No-Ligature hinted)
paru -S maplemononormalnl-nf-cn
# Maple Mono Normal NF CN (No-Ligature unhinted)
paru -S maplemononormalnl-nf-cn-unhinted

Nixpkgs (NixOS, Linux, MacOS)

fonts.packages = with pkgs; [
  # Maple Mono (Ligature TTF unhinted)
  maple-mono.truetype
  # Maple Mono NF (Ligature unhinted)
  maple-mono.NF-unhinted
  # Maple Mono NF CN (Ligature unhinted)
  maple-mono.NF-CN-unhinted
];
All packages (Click to expand)
fonts.packages = with pkgs; [
  # Maple Mono (Ligature Variable)
  maple-mono.variable
  # Maple Mono (Ligature TTF hinted)
  maple-mono.truetype-autohint
  # Maple Mono (Ligature TTF unhinted)
  maple-mono.truetype
  # Maple Mono (Ligature OTF)
  maple-mono.opentype
  # Maple Mono (Ligature WOFF2)
  maple-mono.woff2
  # Maple Mono NF (Ligature hinted)
  maple-mono.NF
  # Maple Mono NF (Ligature unhinted)
  maple-mono.NF-unhinted
  # Maple Mono CN (Ligature hinted)
  maple-mono.CN
  # Maple Mono CN (Ligature unhinted)
  maple-mono.CN-unhinted
  # Maple Mono NF CN (Ligature hinted)
  maple-mono.NF-CN
  # Maple Mono NF CN (Ligature unhinted)
  maple-mono.NF-CN-unhinted

  # Maple Mono (No-Ligature Variable)
  maple-mono.NL-Variable
  # Maple Mono (No-Ligature TTF hinted)
  maple-mono.NL-TTF-AutoHint
  # Maple Mono (No-Ligature TTF unhinted)
  maple-mono.NL-TTF
  # Maple Mono (No-Ligature OTF)
  maple-mono.NL-OTF
  # Maple Mono (No-Ligature WOFF2)
  maple-mono.NL-Woff2
  # Maple Mono NF (No-Ligature hinted)
  maple-mono.NL-NF
  # Maple Mono NF (No-Ligature unhinted)
  maple-mono.NL-NF-unhinted
  # Maple Mono CN (No-Ligature hinted)
  maple-mono.NL-CN
  # Maple Mono CN (No-Ligature unhinted)
  maple-mono.NL-CN-unhinted
  # Maple Mono NF CN (No-Ligature hinted)
  maple-mono.NL-NF-CN
  # Maple Mono NF CN (No-Ligature unhinted)
  maple-mono.NL-NF-CN-unhinted

  # Maple Mono Normal (Ligature Variable)
  maple-mono.Normal-Variable
  # Maple Mono Normal (Ligature TTF hinted)
  maple-mono.Normal-TTF-AutoHint
  # Maple Mono Normal (Ligature TTF unhinted)
  maple-mono.Normal-TTF
  # Maple Mono Normal (Ligature OTF)
  maple-mono.Normal-OTF
  # Maple Mono Normal (Ligature WOFF2)
  maple-mono.Normal-Woff2
  # Maple Mono Normal NF (Ligature hinted)
  maple-mono.Normal-NF
  # Maple Mono Normal NF (Ligature unhinted)
  maple-mono.Normal-NF-unhinted
  # Maple Mono Normal CN (Ligature hinted)
  maple-mono.Normal-CN
  # Maple Mono Normal CN (Ligature unhinted)
  maple-mono.Normal-CN-unhinted
  # Maple Mono Normal NF CN (Ligature hinted)
  maple-mono.Normal-NF-CN
  # Maple Mono Normal NF CN (Ligature unhinted)
  maple-mono.Normal-NF-CN-unhinted

  # Maple Mono Normal (No-Ligature Variable)
  maple-mono.NormalNL-Variable
  # Maple Mono Normal (No-Ligature TTF hinted)
  maple-mono.NormalNL-TTF-AutoHint
  # Maple Mono Normal (No-Ligature TTF unhinted)
  maple-mono.NormalNL-TTF
  # Maple Mono Normal (No-Ligature OTF)
  maple-mono.NormalNL-OTF
  # Maple Mono Normal (No-Ligature WOFF2)
  maple-mono.NormalNL-Woff2
  # Maple Mono Normal NF (No-Ligature hinted)
  maple-mono.NormalNL-NF
  # Maple Mono Normal NF (No-Ligature unhinted)
  maple-mono.NormalNL-NF-unhinted
  # Maple Mono Normal CN (No-Ligature hinted)
  maple-mono.NormalNL-CN
  # Maple Mono Normal CN (No-Ligature unhinted)
  maple-mono.NormalNL-CN-unhinted
  # Maple Mono Normal NF CN (No-Ligature hinted)
  maple-mono.NormalNL-NF-CN
  # Maple Mono Normal NF CN (No-Ligature unhinted)
  maple-mono.NormalNL-NF-CN-unhinted
];

CDN

Maple Mono

Maple Mono CN

Usage & Feature Configurations

See in document or try it in Playground

Naming FAQ

Features

  • Ligature: Default version with ligatures (Maple Mono)
  • No-Ligature: Default version without ligatures (Maple Mono NL)
  • Normal-Ligature: --normal preset with ligatures (Maple Mono Normal)
  • Normal-No-Ligature: --normal preset without ligatures (Maple Mono Normal NL)

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

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". Using "unhinted font" will lead to misalignment or uneven thickness on your text.
    • 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 MacBook). Using "hinted font" 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.
  • Why there exists -AutoHint and -unhinted suffix?
    • for backward compatibility, I keep the original naming scheme. -AutoHint is only used for TTF format.

Custom Build

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.

Build In Browser

Go to Playground, and click "Custom Build" button in the bottom left corner

Use 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

Use 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 Build

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 and run the commands there

Custom Nerd-Font

If you just want to get fixed width icons, setup "nerd_font.mono": true in config.json or add --nf-mono flag to build script args.

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

  • if "nerd_font.mono" is true, then add --mono

Preset

Run build.py with --normal flag, make the font looks not such "Opinioned" , just like JetBrains Mono (with slashed zero).

If you are using variable font (NOT recommended), please enable calt to make all features work.

Enabled features:

cv01, cv02, cv33, cv34, cv35, cv36, cv61, cv62, ss05, ss06, ss07, ss08

Online Preview

Font Feature Freeze

There are three kinds of options for feature freeze (Why):

  1. enable: Forcely enable the features without setting up cvXX / ssXX / zero in font features config, just as default glyphs / 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

Custom OpenType Feature

OpenType Feature is used to control the font's built-in variants and ligatures. You can remove some ligatures or features you don't want to, change feature's trigger rule or add some new rules by modifying OpenType Feature.

By default, the Python module in source/py/feature/ will generate feature rule string and load it at build time. You can modify the features or customize tags there.

If you would like to modify the feature file instead, run build.py with --apply-fea-file flag, the feature file from source/features/{regular,italic}.fea will be loaded.

Infinite Arrow Ligatures

Inspired by Fira Code, the font enables infinite arrow ligatures by default from v7.3. For some reason, the ligatures are misaligned when using hinted font, so they are removed in hinted version by default from v7.4. You can setup "keep_infinite_arrow": true in config.json or add --keep-infinite-arrow in cli flag. See more details in #508

Chinese version

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.

Narrow spacing in CN glyphs

If you think that CN glyphs spacing is TOOOOOO large, there is a build option cn.narrow or cli flag --cn-narrow to narrow spacing in CN glyphs, but this will make the font cannot be recogized as monospaced font.

You can see effect in #249.

GitHub Mirror

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.

Traditional Chinese Punctuation Support

By enabling cv99, all Chinese punctuation marks will be centred. See more details in #150

Build Script Usage

usage: build.py [-h] [-v] [-d] [--debug] [-n] [--feat FEAT] [--apply-fea-file]
                [--hinted | --no-hinted] [--liga | --no-liga] [--keep-infinite-arrow]
                [--remove-tag-liga] [--line-height LINE_HEIGHT] [--nf-mono]
                [--cn-narrow] [--cn-scale-factor CN_SCALE_FACTOR] [--nerd-font |
                --no-nerd-font] [--cn | --no-cn] [--cn-both] [--ttf-only]
                [--least-styles] [--font-patcher] [--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 and faster build

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
  --keep-infinite-arrow
                        Keep infinite arrow ligatures in hinted font (Removed by
                        default)
  --remove-tag-liga     Remove plain text tag ligatures like `[TODO]`
  --line-height LINE_HEIGHT
                        Scale factor for line height (e.g. 1.1)
  --nf-mono             Fixed Nerd Font icons' width
  --cn-narrow           Make CN / JP characters narrow (And the font cannot be
                        recogized as monospaced font)
  --cn-scale-factor CN_SCALE_FACTOR
                        Scale factor for CN / JP glyphs. Format: <factor> or
                        <width_factor>,<height_factor> (e.g. 1.1 or 1.2,1.1)

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
  --least-styles        Only build Regular / Bold / Italic / BoldItalic style
  --font-patcher        Force the use of Nerd Font Patcher to build NF format
  --cache               Reuse font cache of TTF, OTF and Woff2 formats
  --cn-rebuild          Reinstantiate variable CN base font
  --archive             Build font archives with config and license. If has `--cache`
                        flag, only archive NF and CN formats

Development

Design

Using FontLab or Glyphs, generate variable TTF into source/ folder.

Build

# Init project
uv sync
# Dev
uv run build.py --ttf-only --cn --debug
# Update nerd font
uv run task.py nerd-font
# Update fea file
uv run task.py fea
# Update landing page info
uv run task.py page
# Release
uv run task.py release 7.0

Credit

Sponser

If this font is helpful to you, please feel free to buy me a coffee

or sponser me through Afdian

Star History

Star History Chart

License

SIL Open Font License 1.1