Importing And Exporting
Import Sources
The app can currently open these families directly:
- `.alphabit.json`
- Alphabit settings JSON such as `.settings.alphabit.json`
- packed embedded C arrays in `.c` and `.h`
- BDF
- Mac bitmap `.dfont`
- Windows raster `.fon` and `.fnt`
- Playdate standalone `.fnt`
- BMFont ZIP bundles containing an AngelCode `.fnt` descriptor and PNG atlas pages
- Adafruit classic and `GFXfont` sources
- TFT_eSPI simple and RLE bitmap sources
- outline `.otf`, `.ttf`, `.woff`, and `.woff2`
Format Support
| Format | Import | Export | Notes |
|---|---|---|---|
| `.alphabit.json` | Current | Current | Full-fidelity editor format. |
| STM32 SSD1306 packed `uint16_t` C | Current | Current | Explicit glyph order, shared bitmap metrics. |
| Row-packed `uint8_t` C | Current | Current | Fixed-width row-packed byte import/export with glyph-order comments. |
| Mac bitmap `.dfont` | Current | Not planned | Bitmap strikes only. Outline-only `.dfont` files are rejected. |
| Windows raster `.fon` / `.fnt` | Current | Later | Classic Windows bitmap resources, including multi-font containers. |
| Playdate standalone `.fnt` | Current | Current | Embedded atlas import/export with widths, tracking, and kerning support. |
| BDF | Current | Current | Useful bitmap interchange format. |
| Adafruit classic `glcdfont.c` | Current | Later | Classic fixed-width source arrays. |
| Adafruit `GFXfont` | Current | Current | Placement-aware import/export. Kerning is not part of the runtime format. |
| TFT_eSPI simple bitmap fonts | Current | Planned | `Font16.c`-style width tables plus row-packed glyph arrays. |
| TFT_eSPI RLE bitmap fonts | Current | Planned | `Font32rle.c`-style run-length encoded glyph arrays. |
| Outline `.otf` / `.ttf` / `.woff` / `.woff2` | Current | Current-ish | Imported by FreeType rasterisation into the bitmap model. Export writes orthogonal outline OTF from bitmap glyphs. |
| BMFont | Current | Current | Zipped AngelCode text descriptor plus PNG atlas pages. Import supports transparency-based and contrast-based monochrome conversion. |
| UFO / UFOZ | Later | Current-ish | Export writes orthogonal outline glyphs plus kerning data into UFOZ. |
Outline Import
Outline import now uses a custom FreeType WASM build for live preview and import rasterisation. The user chooses a target pixel height, and the importer fits the rendered glyphs within that height before normalizing the font into the editor’s bitmap model.
Supported outline source containers on this path are `.otf`, `.ttf`, `.woff`, and `.woff2`. `.woff2` uses the FreeType metadata and raster path directly and depends on the rebuilt Brotli-enabled browser FreeType bundle.
Variable fonts expose named instances and axes in the import dialog. The preview is intended to follow the same per-glyph raster path as the actual import, rather than approximating it with browser text layout.
The app also supports importing an exported Alphabit settings file to update local preferences such as theme and new-font metadata defaults.
If an imported file lives in cloud or network-backed storage and macOS is still downloading it, the dialog can now wait and retry briefly instead of immediately treating the preview as unreadable.
BMFont Import
BMFont import expects a `.zip` bundle containing the AngelCode text `.fnt` descriptor and all referenced PNG atlas pages. Loose `.fnt` descriptors are not enough because the app needs the atlas images in the same import operation.
The import dialog previews the source atlas and the resulting monochrome glyphs. For ordinary transparent atlases, use alpha thresholding. For flattened full-color atlases, use contrast/luminance thresholding and choose the background that matches the source image.
Export Targets
The app can currently export:
- `.alphabit.json` for full-fidelity editor state
- packed `uint16_t` and `uint8_t` C outputs
- BDF
- Adafruit `GFXfont`
- Playdate standalone `.fnt`
- BMFont
- outline OTF
- UFOZ
Round-Tripping Expectations
The editor has one internal bitmap model. Imports normalize source formats into that model, and exports project that model back into target formats. That means some paths round-trip much better than others.
- `.alphabit.json` is the source-of-truth format for continued editing.
- Component-backed glyphs are preserved in `.alphabit.json`; most runtime exports flatten components into ordinary bitmap pixels through the same shared resolved-glyph path used by previews.
- Bitmap importers usually preserve shape, width, and shared metrics best.
- Format-specific placement offsets, comments, and metadata may be normalized or dropped.
- Fixed-width exports from variable-width fonts are supported, but intentionally lossy.
Kerning Support
Kerning does not exist in every target format. Current practical support is best in Playdate `.fnt`, UFOZ, and outline OTF. Formats such as Adafruit `GFXfont` do not have a kerning table, so kerning is omitted.
The editor can store direct kerning pairs and kerning groups. Runtime formats that do not have group syntax receive flattened concrete pairs. UFOZ writes `groups.plist` and `kerning.plist`; Playdate `.fnt` writes plain runtime pair lines while preserving Caps-style group metadata in `--metrics` for authoring round-trips.
Practical Rule
Save `.alphabit.json` if you want a clean editable source file. Treat exported C, BDF, Playdate, OTF, and UFO outputs as delivery formats for other runtimes and tools, not as guaranteed full-fidelity archival copies of every editing detail.
If the app was updated while your tab stayed open, some import or export actions may ask you to refresh before they can finish. That is a recoverable update-state mismatch, not usually a problem with the font file itself.