Windows Compatibility
Relevant source files
The following files were used as context for generating this wiki page:
Windows compatibility within the AFIO project refers to the support and optimization of the custom Iosevka Nerd Font for use in Windows-based environments. This includes ensuring correct font family naming, vertical metric alignment, and the availability of standard TrueType (TTF) formats that the Windows operating system and its applications (such as VS Code) can consume.
Currently, Windows compatibility is a focal point for future development, specifically regarding the "Windows-friendly" naming of font families to ensure they appear correctly in system menus. While the project is primary built and tested in Dockerized Linux environments, the output TTF files are designed for cross-platform utility.
Sources: README.md:95, build.sh:42-43
Font Family and Naming
The project utilizes the name "afio" as the primary font family identifier. In the build plan, this is explicitly set to ensure consistency across different operating systems. A known "TODO" item in the project roadmap is to verify and potentially adjust the font family name to be more "Windows friendly" to ensure compatibility with various Windows applications.
| Configuration Item | Value | Description |
|---|---|---|
| Family Name | afio | The primary name used in font menus and configurations. |
| Spacing | term | Terminal spacing for better alignment in IDEs. |
| Weights | 300, 400, 500, 700 | Standard weight set provided for compatibility. |
Sources: private-build-plans.toml:2, README.md:95, README.md:38
Metric Overrides and Vertical Alignment
Windows environments often require specific vertical metric adjustments to prevent glyph clipping or improper line spacing. The private-build-plans.toml provides a dedicated section for metric overrides, though they are currently commented out as defaults. These settings allow for precise control over how the font sits within the line in Windows.
# [buildPlans.afio.metric-override]
# leading = 1250
# winMetricAscenderPad = 0
# winMetricDescenderPad = 0
Sources: private-build-plans.toml:98-101
Build and Patching Workflow
The compatibility with Windows is maintained through the generation of .ttf files using a Dockerized environment. This ensures that the font generation logic (Iosevka build) and the Nerd Font patching logic (using nerd-patcher.py) remain consistent regardless of the host OS used for building.
Build Process Flow
This diagram illustrates how the font is processed from the raw Iosevka source into a patched version compatible with Windows.
The build system specifically targets the TTF format, which is the standard for Windows font support.
Sources: build.sh:44-46, src/nerd-patcher.py:41
Application Configuration (VS Code)
For Windows users using VS Code, compatibility is achieved by referencing the afio font family and specific weights. The project recommends disabling ligatures and setting specific line heights to ensure the Nerd Font icons and custom glyphs align correctly.
"editor.fontFamily": "afio",
"editor.fontLigatures": false,
"editor.fontWeight": "500",
"editor.fontSize": 16,
"editor.lineHeight": 21
Sources: README.md:52-58
Validation via Showcase Generation
To ensure the font renders correctly across different platforms, the project includes a showcase generator. This tool renders SVG and PNG matrices of the font weights using a Linux-based Docker container, providing a visual baseline for how the font should appear on any OS, including Windows.
Conclusion
Windows compatibility in the AFIO project is established through the provision of standard TrueType files and configurable metric overrides. While automated installation scripts currently focus on Linux and macOS, the manual installation of the generated releases provides full functionality for Windows users, with ongoing efforts to refine font naming for better system integration.