Turn a photographed alphabet sheet into a real OpenType font in minutes.
Upload handwriting or printed letters, detect glyph regions with Gemini, correct anything by hand, and export a working .otf file without leaving the browser.
Most font-generation tools are either too technical, too manual, or too opaque. AutoGlyph keeps the loop tight:
- Drop in an alphabet sheet.
- Let Gemini propose letter boxes.
- Click any box to fix the character mapping.
- Export a usable OpenType font.
That makes it fast enough for experimentation and explicit enough to trust.
- Uploads an image of handwritten or printed alphabet characters.
- Detects candidate glyph boxes from the image with Gemini.
- Draws every detected region directly on the source image.
- Lets you click a region, relabel it, or delete it.
- Converts image crops into vector glyph paths.
- Exports the result as an OpenType font file.
- Includes a built-in demo so the full editing/export flow works even without an API key.
-
Load an image Use your own alphabet sheet or the built-in demo sample.
-
Detect letters Gemini analyzes the image and returns normalized bounding boxes for each detected character.
-
Clean up the mapping Click any box to edit the assigned character or remove a bad detection.
-
Tune the font Set a font name and choose whether the source image uses dark ink on a light background.
-
Export AutoGlyph traces each crop into vector outlines and downloads an
.otffont.
npm installnpm run server
npm run devOpen http://localhost:3000.
Click Load Demo and export a font immediately.
Create a local env file and add your Gemini key:
cp .env.example .env.localSet:
GEMINI_API_KEY=your_key_hereThen run the server process and use Detect with Gemini when you want AI-assisted boxing.
- Put one character per region with generous spacing.
- Use a high-contrast sheet.
- Keep the page roughly flat and evenly lit.
- Review detections before exporting.
- Include ascenders and descenders clearly for lowercase letters.
React 19+ViteTailwind CSS v4@google/genaifor image-to-box detectiond3-contourfor outline extractionopentype.jsfor font assembly and download
- Detection results use normalized
[ymin, xmin, ymax, xmax]coordinates. - Export currently produces an OpenType font file.
- Glyph sizing uses character-specific metric heuristics so uppercase, x-height, ascenders, and descenders land in more believable vertical positions.
- The demo path is bundled into the app so screenshots, testing, and first-run experience do not depend on external secrets.
- Detection quality depends heavily on the uploaded sheet.
- Kerning and advanced font metadata are intentionally minimal.
- The generated font is best for experiments, prototypes, and expressive custom sets rather than production typography.
src/
App.tsx Main UI and interaction flow
demoAlphabet.ts Built-in demo sample metadata
utils/
gemini.ts Image-to-letter detection via Gemini
fontGenerator.ts Raster crop to vector glyph export
public/
demo-alphabet.svg Bundled demo source image
docs/images/ README screenshots
npm run lint
npm run buildThis project now supports a deliberately simple personal-server deploy flow.
- Create a deploy env file:
cp .env.deploy.example .env.deploy.local-
Put your FTP credentials in
.env.deploy.local. -
Build and upload the site:
npm run build
npm run deployNotes:
- The deploy script uploads the contents of
dist/topublic_htmlby default. .env.deploy.localstays gitignored via.env*, so your FTP password should not be committed.- FTPS is used by default (
FTP_SECURE=true). If the host only accepts plain FTP, setFTP_SECURE=false. - The remote target can be changed with
FTP_REMOTE_DIR.
If your hosting account supports PHP, this repo now includes public/api/detect-letters.php.
To enable Gemini detection in production:
- The deploy script uploads
public/api/detect-letters.phpintopublic_html/api/ - Put
GEMINI_API_KEY=your_key_herein a server-side.env.localfile at the project root on the host - Confirm PHP has cURL enabled
The frontend now calls /api/detect-letters.php in production.
AutoGlyph is a small, sharp tool for a very satisfying workflow: take a physical alphabet, map it quickly, and leave with a font file.
It is part creative toy, part practical utility, and now it has a README worthy of the thing itself.

