Skip to main content
❯ _
❯ main
  • Home
  • About
  • Hello
  • Feed
  • Email
  • Guestbook
❯ explore
  • Blog
  • Notebook
  • Now
  • Verify
  • Resume
  • Interests
  • Tags
  • Why
  • Changelog
  • Humans
  • Palette
  • Privacy
  • Licensing
  • Projects
  • Colophon
  • Meta
  • Search
  • 8biticon
❯ meta
  • PGP Key
  • GitHub
  • LinkedIn
  • Resume.pdf
  • Discord
❯ options

Stops the site's blinking cursor flourishes.

Follows your OS/browser preferred color scheme. Manually switching the theme turns this off.

Shows an animated star field behind the site.

Hiragana rain falls behind the site. Enabling this turns off Stars.

❯ theme

 

 
$HOME / asce1062 / blog / 2026-03-13-fixing-ascii-art-0xproto-nerd-font-mono _

Alex.


Fixing ASCII Art Rendering in 0xProto with Nerd Fonts

2026-03-13 • 4 min read | How to use the Nerd Fonts Mono variant of a typeface for full Unicode coverage, and generate WOFF2 from TTF using fontTools. patching & Converting Web Fonts with Nerd Fonts tags: fonts web nerd-fonts ascii-art typography tools unicode

Table of Contents

Open Table of Contents
  • Fixing ASCII Art Rendering in 0xProto with NerdFontMono
    • $ whatis nerd-fonts
    • $ cat ~/why-we-needed-this.md
    • $ ls ~/download-options/
    • $ convert ttf woff2
    • $ cat ~/LICENSE-notes.md
    • $ echo $TLDR

Fixing ASCII Art Rendering in 0xProto with NerdFontMono


fc-query 0xProto.

The base font looked great until I tried rendering ASCII art with Block Elements and the glyphs just weren’t there. Here’s how I fixed it, and how you can do the same for any developer typeface.




$ whatis nerd-fonts

Nerd Fonts is an open source project that takes popular developer fonts and patches them with thousands of additional glyphs crucially the full Unicode Box Drawing and Block Elements ranges.

Three patched variants are available for every font:

VariantAdvance width policyUse case
NerdFontMonoStrict monospace
every glyph 1× cell wide
Terminal, code editors, ASCII art
NerdFontPropoProportional
added glyphs can be wide
GUI apps, proportional UI text
NerdFont (default)Mixed
icons are 2× wide
Terminals that support double-wide chars

For web ASCII art, NerdFontMono is the right pick. Every character, including the 32 Block Elements (U+2580–U+259F) from the original font and 128 Box Drawing characters (U+2500–U+257F), is rendered at exactly the same advance width as a regular letter. That’s what keeps art pixel-perfect in the browser.



$ cat ~/why-we-needed-this.md

The base 0xProto ships with full Box Drawing coverage but zero Block Elements I only discovered this gap when ASCII art on some fonts like ANSI Shadow–style started rendering broken in the browser (visually corrupted, yet copy-paste was correct).

A quick audit with fontTools made the problem obvious:

fontTools audit - 0xProto base font
- Block Elements  (U+2580–U+259F):   0 / 32  glyphs present
+ Box Drawing     (U+2500–U+257F): 128 / 128  glyphs present

The NerdFontMono patch fills both ranges at a consistent 620-unit advance width, identical to the rest of 0xProto’s glyph metrics (upem 1000).
Swapping the font files fixed the rendering without touching a single line of CSS.



$ ls ~/download-options/

Nerd Fonts releases ship .ttf files only. Grab the Mono variant for the typeface you need:

0xProto - NerdFontMono TTF files
0xProtoNerdFontMono-Regular.ttf
0xProtoNerdFontMono-Bold.ttf
0xProtoNerdFontMono-Italic.ttf

Individual font families are available at nerdfonts.com or directly from the GitHub releases.

Why not NerdFontPropo? Audit showed NerdFontPropo sets Block Element advance widths to 618 units vs 0xProto’s 620 (a 2-unit mismatch that causes visible column-drift in multi-line art). NerdFontMono enforces strict equality for all added glyphs.



$ convert ttf woff2

Nerd Fonts provides TTF only. For web serving, WOFF2 (TTF + Brotli compression) is the modern standard. Roughly 30% smaller than TTF and supported by 97%+ of browsers.

Start by installing the tooling:

install dependencies
pip install fonttools brotli

Then convert all three variants in one pass:

generate-woff2.py
from fontTools.ttLib import TTFont
 
variants = [
    ("0xProtoNerdFontMono-Regular.ttf", "0xProto-Regular.woff2"),
    ("0xProtoNerdFontMono-Bold.ttf",    "0xProto-Bold.woff2"),
    ("0xProtoNerdFontMono-Italic.ttf",  "0xProto-Italic.woff2"),
]
 
for src, dst in variants:
    f = TTFont(src)
    f.flavor = "woff2"
    f.save(dst)
    print(f"✓ {dst}")

Lines 11–12 are all that matters: set flavor to "woff2" and save. No glyph data is altered, only the container format and compression change.

Serve both formats via @font-face. WOFF2 first, TTF as the fallback:

style.css
@font-face {
  font-family: "0xProto";
  src:
    url("/fonts/0xProto/0xProto-Regular.woff2") format("woff2"),
    url("/fonts/0xProto/0xProto-Regular.ttf")   format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

The browser picks the first format it can decode (effectively every modern browser takes woff2 and never touches the TTF fallback).



$ cat ~/LICENSE-notes.md

Both 0xProto and Nerd Fonts are released under the SIL Open Font License 1.1. The OFL explicitly permits:

  • Format conversion (TTF → WOFF2)
  • Redistribution bundled with a software project
  • Modification, provided a different name is used for modified versions

That last point is already handled. Nerd Fonts renames the patched typeface (0xProto → 0xProto Nerd Font Mono), so the naming requirement is satisfied. Generating WOFF2 for your own web deployment is permitted without restriction.

What the OFL does not permit: selling the fonts as standalone products.

See also: Licensing & Disclaimer.



$ echo $TLDR

  1. Audit your font for missing Unicode ranges before assuming a rendering bug is CSS, browser or operating system related. fontTools makes this trivial.
  2. Use NerdFontMono for monospace web contexts; the default and Propo variants will cause alignment drift.
  3. Convert TTF → WOFF2 with fonttools + brotli; serve both via @font-face for broad browser coverage.
  4. OFL 1.1 permits this workflow freely. Format conversion is not a modification.

March 17, 2026 613

Share this post on:
Link copied!

Previous
Momentum Makes the Impossible Inevitable

                                              81c8a67 • • 4/23/2026

Alex's Workstation

stellar console

last seen back the same day

visits 1

signal restoring context

incoming transmission 860×580

Search

Search Tips

Indexed: Search by content, dates, description, excerpts, tags or titles

Exact phrases: Use quotes like "I'm happy you're here"

Fuzzy matching: Partial matches like config will find "configuration"

Multiple terms: Search for using icomoon to find posts containing both words

Shortcuts: Use Ctrl+K or Cmd+K for quick access