font-convert

Crates.iofont-convert
lib.rsfont-convert
version0.1.0
created_at2026-01-02 11:48:18.189217+00
updated_at2026-01-02 11:48:18.189217+00
descriptionPure-Rust font converter and subsetter for TTF/OTF/WOFF/WOFF2, optimized for web embedding
homepage
repositoryhttps://github.com/olatunbosunoyeleke94/font-convert
max_upload_size
id2018422
size614,826
Olatunbosun Oyeleke (olatunbosunoyeleke94)

documentation

README

font-convert

A fast, pure-Rust font subsetter for web embedding.

Converts TTF/OTF/WOFF/WOFF2 → tiny WOFF2 (or WOFF/TTF) containing only the characters you need.

Perfect for static sites, build scripts, and reducing web font payload.

Features

  • Pure(ish)-Rust (uses fontcull + Google's fast WOFF2 compression)
  • Subsets based on text (Unicode, accents, emoji supported)
  • Outputs ultra-small WOFF2 (e.g., 555 KB → 4 KB)
  • CLI tool included
  • No Python/fonttools required

Installation

cargo install font-convert

Usage


font-convert \
  --input NotoSans-Regular.ttf \
  --text "Hello World! café 🦀 All your site text here" \
  --output my-site.woff2

Result: my-site.woff2 (~tiny KB), ready for @font-face.

Example


@font-face {
  font-family: 'MySite';
  src: url('my-site.woff2') format('woff2');
  font-display: swap;
}
body { font-family: 'MySite', sans-serif; }
Commit count: 0

cargo fmt