The Font Compile endpoint is the centrepiece of the Glyph Foundry module. After a worldbuilder has designed the individual glyphs of their constructed language inside the SVG canvas editor, this endpoint accepts those glyph definitions — each as an SVG path string with a character mapping and Unicode code point — alongside font-level metadata, and returns a compiled TrueTypeDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Fixius50/WorlBuilding-Writting-App/llms.txt
Use this file to discover all available pages before exploring further.
.ttf font file ready for installation and use in any application.
The compilation is handled server-side by FontCompilerService, which maps each SVG path into a font glyph at the configured em-square resolution and writes a valid TrueType binary.
Base URL
POST /linguistics/font/compile
Compile a set of conlang glyphs and a font configuration into a .ttf TrueType font file.
Request Body
The request body is a JSON object with two top-level keys:config and glyphs.
config — FontConfig
Font-level metadata and typographic metrics applied to the entire font file.
The font family name as it will appear in font pickers and CSS
font-family declarations (e.g. "Aethermoor Script").Version string embedded in the font’s name table (e.g.
"1.0", "0.3-beta").Copyright notice embedded in the font’s name table (e.g.
"© 2025 Jane Doe").The em-square resolution in font units. Standard values are
1000 (PostScript-derived fonts) and 2048 (TrueType). Glyph coordinates are expressed in these units.The ascender height in font units — the distance from the baseline to the top of the em square. Typically 80% of
unitsPerEm.The descender depth in font units — the distance from the baseline downward. Expressed as a negative integer. Typically -20% of
unitsPerEm.glyphs — ConlangGlyph[]
An array of individual glyph definitions. Each entry maps one character to one SVG path.
The character this glyph represents in the conlang’s romanisation or transliteration scheme (e.g.
"a", "th", "ʃ").The Unicode code point to assign this glyph in the compiled font, expressed as a hex string without the
U+ prefix (e.g. "0061" for ‘a’, "E001" for a private-use area character).The SVG path
d attribute string describing the glyph’s outline (e.g. "M 100 700 L 500 700 L 300 100 Z"). Coordinates are interpreted within the width × height canvas.The advance width of this glyph in the source canvas coordinate space. Scaled to font units during compilation.
The height of the glyph’s design canvas in source coordinates. Used to normalise the SVG path coordinates into font units.
Response
200 OK — application/octet-stream — a compiled .ttf TrueType font file.
The Content-Disposition header provides a suggested filename based on the font family name.
Full Request Example
curl Example
Error Responses
| Status | Condition |
|---|---|
400 Bad Request | Malformed JSON or unreachable compiled font path |
404 Not Found | Compiled font file not found after processing |
500 Internal Server Error | Font compilation failure (e.g. invalid SVG path, IO error) |