Appearance
Font Flux JS Documentation
Convert fonts to JSON, make edits, then convert them back!
Font Flux JS is a JavaScript library for parsing OpenType/TrueType font binaries into structured JSON, then exporting that JSON back into a valid font binary. Every table is fully parsed into human-readable fields! If you're ambitious, you can also create a font from scratch.
Font Flux JS is part of the Glyphr Studio family. Any questions or feedback? We'd love to hear from you: mail@glyphrstudio.com
Version 2.7.2 — Generated July 13, 2026.
Get Started
Learn the basics of Font Flux JS and how to create fonts from scratch.
- Default Technology — What format decisions Font Flux makes for you, and why.
- Creating Fonts — Create a new font, set metadata, add glyphs, and export.
- Authoring JSON From Scratch — Hand-write a complete font JSON document, no class API required.
- Validation — Check for structural issues in JSON before exporting.
- Diagnostics — Inspect a binary font file for spec violations and corruption.
Font Features
Guides for adding specific font features to your fonts.
- Creating Glyphs — Glyph metadata, outline formats, and SVG path conversion.
- Creating Kerning — Add pair-based kerning adjustments.
- Creating Substitutions — Ligatures, alternates, small caps, and other GSUB rules.
- Creating Color Fonts — Palettes and color glyphs using COLR/CPAL.
- Creating Variable Fonts — Axes, instances, axis mapping, axis styles, and metric variations.
- Importing Legacy Formats — CFF, PFB, and PFA (PostScript Type 1) import.
Reference
Low-level format details and table-by-table documentation.
- API Reference — The
FontFluxclass and standalone utilities, with full argument documentation. - Creating an OTF — CFF-specific outline details and export options.
- Creating a TTF — TrueType-specific outline details and export options.
- All Tables — Table-by-table reference with JSON examples, notes, and pitfalls.
API
The complete FontFlux class reference — every method, its arguments, and return values — lives on its own page: API Reference.
The library's main entry point exports:
js
import {
FontFlux, // primary class — open / create / export
initWoff2, // async WOFF2 initializer (call once before WOFF2 use)
diagnoseFont, // standalone binary-font diagnostic (Scenario 1 input)
fontFromJSON, // low-level JSON → simplified-data parser
fontToJSON, // low-level simplified-data → JSON serializer
} from 'font-flux-js';For most workflows you only need FontFlux; the standalone utilities are exposed for tooling and tests. See the full API Reference for every method, its arguments, return values, the internal data structure, and glyph-outline details.