Nordwand-Mono README

项目的 README,来自 github.com/tywr/Nordwand-Mono。合并为一个 markdown 文件:README.md。

Nordwand Mono

Nordwand Mono is a compact neo-grotesk monospaced typeface designed for programming. Every glyph is drawn procedurally in Python, so the metrics and stroke weights can be adjusted to produce custom builds.

See the specimen (PDF) for an overview of the character set and weights.

To contribute, please read the contribution guide.

Design

Nordwand Mono combines elements of Adrian Frutiger's Univers with the proportions of JetBrains Mono. The name refers to the north faces (Nordwände) of the Swiss Alps, and to the Swiss typographic tradition the design draws on.

Other references include:

OpenType features

Character variants

Alternative designs are available for several characters. See alternative characters for a visual comparison and the corresponding feature tags.

Stylistic sets

Stylistic sets switch groups of related glyphs at once:

Tag Effect
ss01 Classic l and m, serifed r and f (upright l and f only)
ss02 Arrow ligatures
ss03 Wide-angled <, > and arrow heads

See stylistic sets for details and for instructions on enabling them in common editors and terminals.

Ligatures

The font includes minimal -> and => ligatures. Runs of =, -, _ and # can use joining forms, so their horizontal bars connect across runs of any length. Joining forms are disabled by default and are enabled with the dlig feature.

Installation

Prebuilt font files are attached to each release.

Building from source

Requirements: uv.

make install     # install the Python dependencies
make build-font  # build TTF, WOFF and WOFF2 into ./fonts
make build       # build the fonts, banner, specimen, samples and docs

Nerd Font variant

Nerdwand Mono is the Nerd Font variant of Nordwand Mono, patched with the complete icon set. Icons occupy a single cell, so the font remains strictly monospaced. OTF and TTF files are attached to each release. To build it locally:

make build-font      # build the regular family into ./fonts
make build-nerd-font # patch it into ./fonts/nerd-font

This additionally requires FontForge (brew install fontforge on macOS, apt install fontforge on Debian and Ubuntu), and network access on the first run to download the Nerd Fonts patcher. The patched fonts are written to ./fonts/nerd-font/{otf,ttf}, alongside the font license and the licenses of the bundled icon sets.

Custom builds

Each glyph is a Python class drawn from a drawing context that holds the font metrics (x-height, cap height, stroke weights, etc.). Overriding these values produces a custom build.

  1. Copy config.example.yml to config.yml and edit the values.

  2. Preview individual glyphs:

    uv run python -m nordwand_mono.visualize --config config.yml lowercase_a
    
  3. Build the fonts:

    uv run python -m nordwand_mono.generate_font --config config.yml
    

    The files are written to ./custom-fonts/<FamilyName>, so they do not overwrite the default build.

[!WARNING] The design is tuned for the default metrics. Some glyphs may need adjustments when the metrics are changed.

Example configurations

The configs folder contains alternative configurations, each with a config.yml and a sample.png rendered from it. To add one, create configs/<name>/config.yml and run:

uv run python -m nordwand_mono.scripts.config_sample <name>

This builds the Regular weight (or another weight with --weight) and writes configs/<name>/sample.png.

Weights

The stroke widths in the configuration define the Regular weight; all other weights are derived from them. To select which weights are exported, or to give a weight explicit stroke widths, add a weights section:

weights:
  400:
  425:
    name: Book
    stroke_x: 90   # vertical strokes
    stroke_y: 84   # horizontal strokes
    stroke_alt: 72 # crossbars, e.g. the bar of e
  700:

Only the listed weights are built.

Character set

Character set

The font covers Latin (including the accented letters of most European languages) and Cyrillic.

It also includes the Powerline symbols (U+E0A0–U+E0A3) and segment dividers (U+E0B0–U+E0BF): arrows, rounded ends, corner triangles and diagonals. The dividers span the full line height and slightly overlap the adjacent cell, so status lines render without the Nerd Font variant.

Weights

Weights

Samples

Les Drus

Python

Python sample

C++

C++ sample

Haskell

Haskell sample

Cyrillic

Cyrillic sample

Greek

Greek sample

Powerline

Powerline sample

License

The font files are licensed under the SIL Open Font License 1.1. The source code is licensed under the MIT License.

Nordwand-Mono (tywr/Nordwand-Mono)

正在搜索数据库…

这是什么?Nordwand-Mono 是一款紧凑的等宽新哥特式无衬线字体,专为编程设计,完全由 Python 绘制字形的代码生成,而不是用传统字体编辑器制作。
这是成品字体文件,还是可以用来制作自己字体的工具包?两者兼有:仓库里提供了字体设计,但每个字形实际上都是一个 Python 类,你可以修改它,重新生成个性化版本的字体。
我该如何生成自定义版本的字体?将 config.example.yml 复制为 config.yml,调整 x-height、cap-height 等度量参数,然后用 'python -m visualize --config config.yml' 预览字形,再用 'python -m generatefont --config config.yml' 生成实际字体;输出文件位于 ./custom-fonts 目录。
构建或定制这款字体是否需要安装 Python?需要,字体生成流程完全通过 Python 命令编写和运行。
大幅修改字体度量参数是否安全?不一定:作者提醒,超出默认值修改度量参数并不保证效果好看,可能需要手动调整个别字形。
Nordwand-Mono 支持哪些连字?它包含简约的 -> 和 => 箭头连字,还有连接形式,可以让重复的字符(如 =、- 和 #)的横线跨越任意长度连接起来。这些默认关闭,需通过 OpenType 的 dlig 特性启用。
样式集 ss02 和 ss03 有什么作用?ss02 开启箭头连字,ss03 则切换为宽角箭头头部,让你可以调整字体的整体风格。
'Nordwand' 这个名字从何而来?它借鉴了瑞士标志性的字体排印传统,并让人联想到瑞士阿尔卑斯山北壁('Nordwand')那种严峻、冷峻的氛围。
哪些其他字体启发了这款设计?作者融合了 Adrian Frutiger 的 Univers 的比例与 JetBrains Mono 的字距,还借鉴了 Apple 的 SF Pro/SF Mono、Sharp Type 的 Alpes Mono 以及 Dalton Maag 的 Ubuntu Mono。
作者
tywr
大小
196.1 MB
星标
1.8K
时长
7个月
提交 · 90 天