Font Pirate
codyhxyz/font-pirate
Converta imagens de fonts em OTFs rastreados via potrace
Ver no GitHubRecria fontes a partir de imagens de especimen usando bitmap tracing. Seleciona automaticamente uma base OFL compatível do Google Fonts, renderiza cada glifo em 2000px/em, executa potrace e gera um OTF limpo com nome customizado. Ideal para designers que encontram uma fonte inspiradora e querem uma versão própria sem licenças proprietárias.
Instalação
npx convez-ai codyhxyz/font-pirate1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Reproduzir fontes encontradas em screenshots ou designs
- Gerar variações de typefaces com nomes personalizados
- Criar fonts OTF prontos para uso em web e Figma
Veredito

Ferramenta técnica robusta que resolve um problema real do design — recriar fontes de forma automática e legal usando bases OFL. A qualidade do rastreamento em 2000px/em e a geração de especimen HTML tornam o workflow completo e profissional.
README
A tradução para o português deste README ainda está na fila.
Drop an image of a typeface into the chat and you end up with a renamed OTF that matches its silhouette. font-pirate identifies the closest OFL base font on Google Fonts, renders each glyph at 2000px/em, runs potrace over it, and stitches the result back into a TrueType glyf table with contour directions flipped the way TrueType expects. No hand-coded beziers, no blocking questions, no Glyphs license.
Before → After
Before: "I found a font I love in a screenshot and I just want my own version of it." After: 82 glyphs traced at 2000px/em, base font instantiated at the right weight, name tables rewritten,
FontName-Style.otfon disk, and an HTML specimen page with the full size cascade open in your browser.
What you walk away with
- A working
.otfyou can@font-faceinto a site or drop into Figma today - A matching OFL base font chosen for you — no Adobe/Linotype licensing trap
- A specimen page with A–Z/a–z/0–9/punct + a size cascade, so you know what the result looks like before you ship it
- A pipeline that doesn't hand-code bezier curves — the one thing that makes every "LLM made a font" experiment look amateur
Install
Option 1 — install from the codyhxyz-plugins marketplace (recommended)
/plugin marketplace add codyhxyz/claude-plugins
/plugin install font-pirate@codyhxyz-plugins
Option 2 — install directly from this repo
/plugin marketplace add codyhxyz/font-pirate
/plugin install font-pirate@font-pirate
Option 3 — local smoke test
git clone https://github.com/codyhxyz/font-pirate
claude --plugin-dir ./font-pirate
Prereqs
brew install potrace
pip install pillow fonttools
Try it — paste any of these
"Here's a screenshot of a font I like — make me my own version called 'Halliford'."
"Trace this specimen as a geometric sans at weight 600 and call it 'Moirai Display'."
"Build me an OTF that matches this headline — pick whichever Google Font gets closest as the base."
How it works
- Classify the specimen — serif vs. sans, sub-style, weight, contrast, distinguishing letters.
- Pick an OFL base — maps the classification onto Google Fonts (Montserrat, Playfair, Sacramento, etc.), prefers variable fonts so weight is a parameter not a download.
- Render each of 82 target glyphs at 2000px/em into a Pillow canvas, threshold-binarize, crop.
- Trace each bitmap with
potrace -s --turdsize 2 --alphamax 1.0 --opttolerance 0.2. - Rebuild — parse the SVG path, transform into UPM coordinates, feed through
Cu2QuPen(reverse_direction=True)so contour directions flip correctly, replace entries in theglyftable. - Rename name-table IDs 1/2/3/4/6/9/16/17, save as OTF, emit an HTML test page.
Where it stops
- Only 82 glyphs are traced — accented characters keep the base font's outlines. Latin-only by design.
- No hinting pass. Fine on macOS; Windows small-size rendering can look soft.
- No glyph editing UI — if the trace misses a serif you care about, swap the base font and re-run, don't hand-correct beziers.
- Doesn't download commercial fonts. OFL Google Fonts only.
Examples
You drop in a magazine cover crop. Claude classifies it as high-contrast didone, weight ~700, sharp terminals, picks Playfair Display as the variable base, instantiates at 700, traces the 82 glyphs, and saves Halliford-Bold.otf plus font-test.html. The specimen page shows the pangram at 96/72/48/36/24/18/14/12px so you can tell whether the hairline serifs survived the threshold — if they didn't, you ask for a rerun against Libre Bodoni and you're done in another ~90 seconds.
No specimen image, just a vibe description. Claude pulls Montserrat[wght].ttf, instantiates at 600, runs the pipeline anyway (rendering the base to itself gives you a clean, renamed OTF with no licensing questions), and hands you Moirai-SemiBold.otf. You rename, tweak, ship.
Contributing
Issues and PRs welcome. If a trace comes out spiky or a base-font mapping is wrong for some style, file it with the specimen image + the glyph that broke.
License
MIT © 2026 Cody Hergenroeder. Generated fonts inherit the base font's license — Google Fonts bases are OFL, which permits rename + redistribution.