optimize-web-fonts

Installation
SKILL.md

optimize-web-fonts

Make a site's web fonts smaller and keep rendering pixel-identical. You run scripts by hand, commit their output and say when to rerun them. Nothing is added to the site's build.

Inspired by Shu Ding's prompt: https://x.com/shuding/status/2115855028737200211

Rules (from the owner's brief; do not relax them silently)

  1. Any visual change is a regression unless the user approves it. If an optimization would change rendering, say what it saves and what it changes, and leave it off by default (--axes trim is exactly that case).
  2. Keep the current loading behaviour: do not touch font-display, size-adjust/override descriptors or fallback fonts. The scripts copy those descriptors verbatim.
  3. Preloading is optional. Some sites forbid preloads (they can hurt FCP). Default is to preserve the site's policy: --preload auto preloads the core file only where the site already preloaded that font; off never; on always.
  4. No font processing in the site's build. The user runs the scripts by hand and commits the generated files.
  5. Never ship a Reserved-Font-Name font under its original name after subsetting (OFL). See references/ofl-rfn.md.
  6. Before you call it done: pixel diff on pages with code, italics, accented characters, components with their own font settings and CJK; explain every differing pixel; re-measure; confirm extended files load only where needed.
Installs
1
First Seen
13 days ago