UFO to JSON Converter
Convert UFO (Unified Font Object) font source files to structured JSON. Parse plist XML, GLIF glyphs, kerning, and metadata instantly in-browser.
Drop UFO files here or browse
.plist, .glif, .fea files — or select entire .ufo folder
About
UFO (Unified Font Object) is a directory-based font source format specified by unifiedfontobject.org. Each UFO package contains Apple plist XML files (fontinfo.plist, kerning.plist, groups.plist, lib.plist) alongside GLIF XML files describing individual glyph outlines via contour and component elements. Manually parsing these nested XML structures is error-prone. A misread integer node or dropped dict key can corrupt downstream compilation in tools like fontmake or produce silent metric errors in final OTF/TTF binaries. This converter handles UFO versions 2 and 3.
The tool parses every plist data type: string, integer, real, array, dict, true, false, data (base64), and date (ISO 8601). GLIF files are parsed into structured objects preserving advance widths, unicode codepoints, outline point coordinates with type and smooth attributes, component references with transformation matrices, anchor positions, and per-glyph lib data. This tool approximates a full UFO reader assuming well-formed XML input. It does not validate OpenType spec compliance of the resulting data. Note: binary plist format is not supported. Only XML plist files are accepted.
Formulas
The conversion pipeline processes each UFO file type through a dedicated parser. Plist XML files are parsed using recursive descent on DOM nodes. The core transformation maps Apple plist XML types to their JSON equivalents.
For GLIF files, glyph outlines are extracted by iterating contour β point elements. Each point stores coordinates (x, y) β R2, a type attribute, and an optional smooth flag. Component references preserve the 6-element affine transformation matrix:
Where xScale, yScale default to 1 and all offset/skew values default to 0 when absent. The file classification algorithm uses path-based matching: files ending in .plist are routed to the plist parser, files ending in .glif to the GLIF parser, and .fea files are stored as raw text strings.
Reference Data
| UFO File | Purpose | Format | UFO Version | JSON Output Key |
|---|---|---|---|---|
| metainfo.plist | UFO format version & creator | XML plist | 2, 3 | metainfo |
| fontinfo.plist | Font metrics, naming, dimensions | XML plist | 2, 3 | fontinfo |
| lib.plist | Arbitrary font-level data store | XML plist | 2, 3 | lib |
| groups.plist | Glyph groupings (kerning classes) | XML plist | 2, 3 | groups |
| kerning.plist | Kerning pair values | XML plist | 2, 3 | kerning |
| features.fea | OpenType feature code | Plain text | 2, 3 | features |
| contents.plist | Glyph name β filename mapping | XML plist | 2, 3 | contents |
| *.glif | Individual glyph outline data | GLIF XML | 1, 2 | glyphs[name] |
| layercontents.plist | Layer directory mapping | XML plist | 3 | layercontents |
| data/* | Arbitrary binary data files | Binary | 3 | data (base64) |
| images/* | Background images for glyphs | PNG | 3 | images (base64) |
| GLIF Point Types | ||||
| move | Start of open contour | Attribute | All | type: "move" |
| line | Straight line segment endpoint | Attribute | All | type: "line" |
| curve | Cubic BΓ©zier on-curve point | Attribute | All | type: "curve" |
| qcurve | Quadratic on-curve point | Attribute | All | type: "qcurve" |
| offcurve | BΓ©zier control point (no type attr) | Implicit | All | type: "offcurve" |
| Plist Data Types | ||||
| string | UTF-8 text value | <string> | All | JSON string |
| integer | Whole number | <integer> | All | JSON number |
| real | Floating-point number | <real> | All | JSON number |
| true / false | Boolean value | <true/> <false/> | All | JSON boolean |
| data | Base64-encoded binary | <data> | All | JSON string (base64) |
| date | ISO 8601 date | <date> | All | JSON string (ISO) |
| dict | Key-value dictionary | <dict> | All | JSON object |
| array | Ordered list | <array> | All | JSON array |