Handwriting to Font
Print a template, write your letters, upload the photo and get your handwriting as a TTF font.
How it works
Leave the page fields empty to get a printable handwriting template (PDF) for a character set. Write one character per box, photograph or scan the page and upload it: the four corner squares are found, the page is straightened, every box is read and your strokes are traced into a TrueType font with spacing and basic kerning. The same engine runs in Lumina Type Lab → Glyph Lab on your device.
- Template: four 8 mm corner squares, a 16-bit code strip (2 sync bits, character set, page number, 6 check bits) and a grid of 6 × 7 boxes (A4) or 6 × 6 (US Letter). Each box has a 30 mm writing area with light guides for the cap height (700 font units), x-height (480), baseline (0) and descender; 1 mm equals 40 font units at 1000 units per em.
- Page detection: luminance, Otsu's threshold on a reduced copy, connected dark components; the corner squares are the solid, square components forming the largest convex quadrilateral. A four-point projective transform (DLT) maps sheet millimetres to image pixels and is tried for both paper sizes and all four rotations until the code strip checks out, so sideways or upside-down photos work.
- Each box is resampled through the transform (perspective correction, bilinear) at 3 to 9 samples per millimetre. Ink is darker than the given share of the box's own paper level (90th percentile), so light guide lines, shadows and uneven light are ignored; specks under 0.5 mm² and thin remnants along the box edge are removed.
- Ink is traced with Lumina's raster vectorizer (exact pixel boundaries with holes), smoothed (edge midpoints and a binomial filter), simplified with Ramer–Douglas–Peucker and written as quadratic B-spline contours; turns sharper than 65° stay corners. Glyphs keep their height on the printed baseline.
- Spacing: the writing slant is estimated as the median shear that makes tall glyphs narrowest; side bearings are measured in de-slanted coordinates. Kerning compares the right ink profile of each glyph with the left profile of the next in 25-unit bands and closes gaps wider than two side bearings by the chosen strength (−300 to +200 units, |k| ≥ 15).
- The font is written and read back by the same TrueType writer and checks as Lumina Font Foundry and the lumina-font-builder tool (outlines, character map, checksums, kerning).
Photos need all four corner squares, even light and sharp focus. Joined (cursive) writing is not split into letters, and no ligatures or alternates are made: one box gives one glyph. The fonts have no hinting. JPEG and WebP pages are decoded on the server; the app reads them on your device.
Sources
- N. Otsu, A threshold selection method from gray-level histograms (IEEE Trans. SMC, 1979) (IEEE)
- R. Hartley, A. Zisserman: Multiple View Geometry, §4.1 Direct Linear Transformation (Cambridge University Press)
- D. Douglas, T. Peucker: Algorithms for the reduction of the number of points (Cartographica, 1973) (University of Toronto Press)
- OpenType specification 1.9.1 (GSUB, GPOS, cmap, glyf, kern, post) (Microsoft)
Part of Lumina
-
Lumina Photo editor & image toolkit
Bring out what you saw. A free photo studio, right in your browser.
Related tools
- TrueType & Variable Font Builder – Turn glyph outlines or a grid font into a verified TTF, including variable weight fonts.
- Pixel & Grid Font Maker – Type pixel letters as # and . grids and get an installable TTF font: merged, dotted or tiled.
- OpenType Feature Playground – See which OpenType features and variable axes a font has, and what they do to your text.
- Raster Artwork to SVG – Trace logos and flat artwork into real SVG paths with a limited color palette.
How to use Handwriting to Font
Print a handwriting template, photograph the filled-in pages and get your own handwriting as an installable TrueType font with spacing and kerning.
What it is for
You want a font that looks like your own handwriting — for invitations, a comic, a school worksheet or a personal website. The tool works in two steps. Leave the page fields empty and it returns a printable template PDF for the character set you choose. Write one character per box, photograph or scan the pages and upload them: the tool finds each page, straightens it, traces every box and writes a TrueType font.
The same engine runs in Lumina's Type Lab → Glyph Lab on your device, where you can also untick smudged letters before downloading. The tool does not join cursive letters, invent missing characters or add ligatures: one box gives one glyph.
Worked example
First we asked for a template with Basic Latin with German letters on US Letter. Result: "Handwriting template with 83 characters on 3 US Letter pages", 36 boxes per page, and a 9 KB PDF to print at 100 %.
Then we ran the second example, a synthetic phone photo of the Capitals template with 16 letters written in, shot at an angle on a grey table.
- Pages read: page 1, A4, turned by 0°, code strip read, 4.1 pixels per millimetre, 16 of 42 boxes with ink.
- Glyphs traced: 16; Characters without a glyph: 26 (B, C, D … left empty on purpose).
- Writing slant: 7°; Kerning pairs: 104 (for example A–V is pulled together, H–H is not touched).
- DemoHand-Regular.ttf: every read-back check passed (12 table checksums, 17 of 17 characters mapped, outlines read back point for point).
The sample "HALT! TO VANE 17." is drawn from the new font's outlines.
How to read the result
- Pages read tells you which page each image was, whether it was upside down or sideways (Turned by), and the resolution. Below about 4 pixels per millimetre letters get blocky; use a sharper photo or a 150 dpi scan.
- Glyphs lists every character of the template: Traced with its contours, points and advance width, Empty box, or Page missing when you did not upload that page.
- Writing slant is the lean of your letters. Spacing is measured along that slant, as in an italic font, so slanted handwriting is not spaced too loosely.
- Read-back checks are the same checks as the TrueType font builder: if one fails, do not install the font.
- Download the font project gives a
.lumina-font.jsonyou can open in Font Foundry to fix outlines, adjust kerning or add a Bold master.
Tips and common mistakes
- Print at 100 %. "Fit to page" changes the box size and the letters come out too small or too large.
- Use a dark pen. If thin strokes break up, raise Ink level (for example from 0.6 to 0.7); if shadows or guide lines appear as blobs, lower it.
- Keep all four black corner squares and the small code squares at the top in the photo, with even light and no fingers on the page.
- Sit letters on the solid baseline. The font keeps each glyph's height where you wrote it, so a letter written too high floats in text.
- Automatic kerning strength 0 turns kerning off; 1 closes every gap to the stem-to-stem distance. 0.6 is a calm middle.
- Smooth curves gives a pen-like outline; Straight segments keeps a more angular, marker-like look.
FAQ
Can I add more pages later?
Yes. Upload up to three pages per call here, or up to fifteen in Glyph Lab. Each page carries its own code, so the order of the files does not matter and a page uploaded twice simply replaces the first copy.
Why are some of my letters missing?
A box counts as empty when nothing in it is darker than the ink level. Faint pencil, a very thin pen or a strongly overexposed photo cause this. Raise the ink level or rewrite the letter darker.
Does it work with joined-up writing?
No. Each box becomes exactly one glyph, so write separate letters. Joined cursive needs contextual alternates, which this tool does not create.
Who owns the font?
You do. Your handwriting and the generated outlines are yours; add your own license text in Font Foundry if you share the font.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://luminahandwritingfont.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://luminahandwritingfont.usefulweb.app/mcp· tool namelumina_handwriting_font
Example request
curl -s -X POST https://luminahandwritingfont.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"preset":"1","paper":"a4","custom":"","familyName":"My Handwriting","ink":0.6,"outline":"smooth","sideBearing":40,"spaceWidth":300,"kerning":0.6,"sample":"","date":""}'