Font Monospacer
Turn a proportional TrueType font into a monospaced one for code, tables and terminals.
How it works
Upload a TTF or WOFF font with TrueType outlines. Every character gets the same width (taken from the digit 0, the average letter, the widest character or your own value); letters are centred in their cell or keep their side-bearing balance, and letters that are too wide are narrowed or may stick out. You get a renamed, verified TTF or WOFF marked as monospaced, read back with Lumina's own font reader.
- Cell width: the advance of the digit 0, the rounded mean advance of A–Z, a–z and 0–9, the widest character from U+0021 to U+007E, or a custom width in thousandths of an em scaled to the font's units per em.
- Every glyph with a non-zero advance gets the cell width. Its ink box (from the outline points) is centred in the cell or placed with the original left/right side-bearing ratio. With "narrow them to fit", ink wider than the cell minus the margins is scaled horizontally about its left edge, x′ = left + (x − xMin) · s; affine maps keep quadratic curves exact, then points are rounded to whole font units.
- Zero-width glyphs keep zero width. Combining marks drawn left of the origin are moved so that their centre sits over the middle of the previous cell. Composite glyphs are flattened into simple outlines; the instructions are removed.
- The font is rebuilt with new glyf, loca, hmtx, maxp, head and hhea tables, OS/2 average width and PANOSE proportion "monospaced", post.isFixedPitch = 1 and a renamed name table (copyright, version, designer and license kept). cmap, GSUB, GDEF and vertical metrics are copied. GPOS, kern, hinting and device-metric tables are dropped.
- Read-back with Lumina's font reader: table and file checksums, every advance equals the cell (or zero, or two cells), isFixedPitch, the same character map and every outline point for point. Variable fonts are frozen at one instance first (gvar and HVAR applied).
This changes spacing, not design: narrowed glyphs get thinner vertical strokes, and nothing is redrawn by a type designer. Check the font's license before sharing the result: some licenses forbid modified versions or reserve the font name. CFF (PostScript-outline) fonts and WOFF2 are not supported; hinting, kerning and mark positioning are removed.
Sources
- OpenType specification 1.9.1 (GSUB, GPOS, cmap, glyf, kern, post) (Microsoft)
- OpenType Layout tag registry: feature tags (Microsoft)
- Fontconfig: spacing property (proportional, dual, mono) (freedesktop.org)
Part of Lumina
-
Lumina Photo editor & image toolkit
Bring out what you saw. A free photo studio, right in your browser.
Related tools
- Webfont Subsetter (WOFF & TTF) – Shrink a font to the characters your site uses and get a WOFF file with its CSS unicode-range.
- Font File Inspector & Glyph Coverage – Read TTF, OTF and WOFF names, tables, metrics, axes, kerning and Unicode coverage.
- OpenType Feature Playground – See which OpenType features and variable axes a font has, and what they do to your text.
- Pixel & Grid Font Maker – Type pixel letters as # and . grids and get an installable TTF font: merged, dotted or tiled.
How to use the Font Monospacer
Turn a proportional TrueType font into a monospaced TTF or WOFF for code, tables and terminals, with every width and outline checked after the rebuild.
What it is for
Code editors, terminals and plain-text tables line characters up in columns, which only works when every character has the same width. In most fonts an "i" is narrow and an "m" is wide. The Font Monospacer gives every spacing glyph of a TrueType font one fixed width, the cell, and places its shape inside that cell. Shapes that are too wide are either narrowed horizontally or allowed to stick out.
The result is a real font file under a new name, marked as monospaced so that operating systems and editors list it as a fixed-width font. Lumina's Type Lab → Glyph Lab → Monospace runs the same engine on your device, adds a live browser preview and measures the widths in your browser.
Worked example
We uploaded Noto Sans Regular (3,884 glyphs, 1,000 units per em) and kept the defaults: cell width from the digit 0, narrow wide glyphs with 4 % space on each side, centred placement, TTF.
- Cell width: 572 font units (the width of "0" in Noto Sans).
- Glyphs narrowed: 1,343; Glyphs sticking out: 0; Round-trip verification: Passed.
- In the Basic Latin characters table, "i" goes from 258 to 572 units with a shift of 157 units and keeps its shape (horizontal scale 1), while "m" (935 units) is narrowed to scale 0.684 and "W" (930 units) to 0.5812.
- Most narrowed glyphs starts with the three-em dash ⸻ at 0.1906: very wide symbols suffer most.
- Tables left out: GPOS. The warnings say that kerning and mark positioning were removed, that 1,343 glyphs were narrowed and that combining accents were moved over the centre of the cell.
With Keep their shape (they may stick out) instead, nothing is narrowed and 906 glyphs stick out of their cells; "m" then reaches 183 units beyond the left edge of its cell and touches its neighbours.
How to read the result
- Cell width is in font units; divide by the units per em for ems (572 / 1000 = 0.572 em).
- Before and After draw your sample text from the old and new outlines.
- Read-back checks come from reading the new file again: table and file checksums, every advance equal to the cell (zero-width accents stay zero), the monospaced flag, the unchanged character map and every outline point for point.
- Basic Latin characters lists old width, new width, horizontal scale and shift; a scale below 1 means the glyph was narrowed, and "Sticks out" marks ink outside the cell.
- Tables left out names what no longer fits fixed cells, typically GPOS, kern and the hinting tables fpgm, prep and cvt.
Tips and common mistakes
- Width of the digit 0 suits code fonts; Widest basic Latin character avoids narrowing ASCII but makes "i" float in a wide cell; Custom width of 600 gives the classic 0.6 em of many coding fonts.
- Narrowing thins vertical strokes; raise the cell width if "m" and "W" look too light.
- Keep the side-bearing balance splits the free space in the ratio of the original left and right side bearings; Centred is the usual monospace look.
- Fonts with CJK glyphs: tick Give very wide glyphs (1.5 cells or more) two cells so ideographs keep a double cell.
- Variable fonts are frozen first: enter
wght=700in Freeze a variable font at for the bold instance. - CFF-outline
.otffonts and WOFF2 are refused with a message; convert them to TTF first.
FAQ
Is the new font really monospaced for my editor?
Yes. Every glyph with a width gets exactly the cell width, post.isFixedPitch is set and the OS/2 PANOSE proportion says monospaced. FreeType's fontconfig reports such files as spacing "mono", and the app checks the widths in your browser.
Why are kerning and hinting removed?
Kerning moves letter pairs closer, which breaks columns. Hinting instructions refer to the old point positions, so the font is written unhinted.
Am I allowed to monospace a font?
It is a modified version, so check the license. The SIL Open Font License allows it but may reserve the original name; the tool always writes a new family name (original name plus "Monospaced") and warns about reserved names and restricted embedding flags.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://luminafontmonospace.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://luminafontmonospace.usefulweb.app/mcp· tool namelumina_font_monospace
Example request
curl -s -X POST https://luminafontmonospace.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'