opentype-js

Installation
SKILL.md

opentype.js

Overview

Read and write OpenType fonts. Access every glyph, measure text, convert to SVG paths.

opentype.js 2.0 (npm opentype.js, MIT) parses TTF, OTF and WOFF (not WOFF2), handles kerning and ligatures, and also supports variable fonts, COLR/CPAL colour glyphs and TrueType hinting. opentype.load() and loadSync() are deprecated: read the file yourself and call opentype.parse(). In ESM code use the default import (import opentype from "opentype.js"); named imports such as { Font } fail under Node because the package is CommonJS.

Instructions

Setup

# Install opentype.js for font parsing and manipulation.
npm install opentype.js

Loading a Font

Installs
3
GitHub Stars
182
First Seen
Mar 13, 2026