ANSItype: Browse TDF Fonts in the Browser

A while back I wrote about using TheDraw fonts with tdfiglet as an alternative to standard FIGlet fonts. The problem with that workflow is you have to download fonts, run commands, and iterate blindly until you find one you like.

So I built ANSItype — a browser-based renderer that lets you type text and preview it in any TDF font instantly, no install required.

What it does

How it’s built

The stack is Astro on Cloudflare Workers, with all ~22MB of .tdf font files stored in Cloudflare R2. When you pick a font and hit render, the Worker fetches the font binary from R2, parses it, and returns the ANSI output as HTML.

The TDF parsing is handled by a TypeScript port of tdfiglet — the original C reference implementation. ANSI escape codes get converted to HTML <span> tags using the authentic CGA 16-color palette, so the output looks like it came out of a DOS terminal.

The font library

The fonts come from the Roy SAC TDF archive, which has been cataloging TheDraw fonts for years. The archive includes author credits and artistic style classifications, which ANSItype uses for filtering.

Font types supported:

ansitype.com