AFIO Font Characteristics
Relevant source files
The following files were used as context for generating this wiki page:
AFIO is a highly customized version of the Iosevka font, specifically patched with Nerd Font icons. The project provides both a ready-to-use font and a modular framework for users to build their own custom variants by modifying configuration files and utilizing a Docker-based build pipeline.
Sources: README.md:1-12
The characteristics of the font are defined through specific build plans that dictate glyph shapes, weights, and spacing. These characteristics are implemented via a private-build-plans.toml file and verified through a showcase generation script that renders the font under various themes and weights.
Sources: private-build-plans.toml:1-5, src/generate_showcase_matrix.py:16-24
Core Visual Configuration
The AFIO font is characterized by a "term" spacing and "sans" serif style. It explicitly disables Ligatures in recommended VSCode settings and excludes italic or oblique versions to maintain a consistent terminal aesthetic.
Sources: README.md:38-51, private-build-plans.toml:2-4
Glyph Variants
The project employs a "very opinionated" set of glyph variants to improve readability and aesthetic appeal. These are defined in the build plan's design variants section.
| Character | Variant Style | Configuration Key |
|---|---|---|
f | flat-hook-serifless-crossbar-at-x-height | f |
i | serifed-asymmetric | i |
l | serifed-semi-tailed | l |
m | short-leg-serifless | m |
0 | dotted | zero |
9 | open-contour | nine |
* | hex-low | asterisk |
% | dots | percent |
@ | fourfold-solid-inner-tall | at |
. (tittle) | square | tittle |
Sources: README.md:38-40, private-build-plans.toml:8-19
Weight and Width Specifications
AFIO defines four distinct weights. A key characteristic of the AFIO build is that the "bold" shape is mapped to a value of 500, which is lighter than the standard Iosevka bold default.
Sources: README.md:41-42, private-build-plans.toml:49-65
Weight Mapping Table
The font uses specific mappings between internal "shape" weights and external "menu/css" weights.
| Weight Name | Shape Weight | Menu/CSS Weight |
|---|---|---|
| Light | 200 | 300 |
| Regular | 300 | 400 |
| Medium | 400 | 500 |
| Bold | 500 | 700 |
Sources: private-build-plans.toml:49-65
Physical Dimensions
The font utilizes a specific width grade for glyph shapes to ensure consistent terminal density.
- Shape Width: 540 (Width grade of glyph shapes)
- Menu Width: 5 (Width grade for font names)
- Stretch: "normal" (CSS font-stretch property)
Sources: README.md:45, private-build-plans.toml:88-91
Build and Patching Logic
The AFIO font characteristics are realized through a multi-stage build process. It first compiles the base Iosevka font using the private-build-plans.toml and then applies the Nerd Font patcher to inject icons.
Data Flow Diagram
This diagram shows how configuration files and scripts interact to produce the final font files.
The flow starts with the build plan configuration, which guides the creation of raw TTF files before the Nerd Patcher adds icon support. Sources: build.sh:44-50, src/nerd-patcher.py:41-55
Nerd Font Integration
The font characteristics include over 9,000 icons. The patching process uses specific flags to maintain font naming while injecting symbols.
- Flags used:
-q(quiet),-s(single),-l(adjust line height),-c(complete),--careful, and--makegroups -1(to prevent renaming the font family).
Sources: README.md:19, src/nerd-patcher.py:16-24
Visual Validation and Showcase
To ensure font characteristics meet design goals across different environments, the project includes a showcase generator. This script renders the font in both "Light" and "Dark" themes for all configured weights.
Theme Characteristics
The showcase script defines specific color palettes that the AFIO font is expected to complement.
| Element | Dark Theme (Hex) | Light Theme (Hex) |
|---|---|---|
| Background | #23272c | #ffffff |
| Foreground | #a9b7c6 | #1a1a00 |
| Keywords | #db7e32 | #d73a49 |
| Strings | #7cb961 | #22863a |
Sources: src/generate_showcase_matrix.py:34-71
The showcase generation relies on a Docker container (debian:trixie-slim) to ensure that font rendering is consistent regardless of the host OS (Linux, macOS, or CI).
Sources: src/generate_showcase_matrix.py:126-144
Distribution Characteristics
AFIO is distributed as a set of four primary files, as evidenced by the Homebrew cask template and release scripts.
afio-Bold.ttfafio-Light.ttfafio-Medium.ttfafio-Regular.ttf
Sources: homebrew/font-afio.template.rb:11-14
The release assets are bundled into a ZIP file named following the convention afio-YYYY-MM-DD.zip (during local builds) or afio-VERSION.zip (for official releases).
Sources: src/nerd-patcher.py:53, homebrew/font-afio.template.rb:5
Summary
The AFIO font is characterized by its specific hand-picked glyph variants (such as the dotted zero and square tittle), a custom-tuned weight scale where bold is intentionally kept lighter (shape 500), and a "term" spacing configuration optimized for coding. These characteristics are strictly managed through a TOML-based build plan and a automated Docker pipeline that ensures consistent Nerd Font patching and visual verification via generated showcases.