Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit44fd9e59bd

README.md

Font Importer

Claims loose font-file writes (ttf / otf / woff / woff2) anywhere outside a .font/ folder and bakes them into a managed .font asset:

<name>.ttf  →  <name>.font/
                 data.zfnt     baked, vectorized glyph payload (the primary)
                 <name>.ttf    the original source, moved in (never lost)

The bake runs the engine's font primitive font.parse once (ttf-parser → per-glyph vector outlines + metrics + character map → ZFNT). The original font file is moved into the .font/ folder so its provenance is tracked and asset.containing resolves it to its own asset — the same pattern the SVG→texture and glb→bundle importers use.

The .font assetType's onRegister then loads data.zfnt on every world load via font.register, making the family resolvable on every text surface (fontFamily = "<name>") and available to font.glyph / font.textMesh for true 3D glyph geometry.

This file is only the format-specific canImport + import pair; dispatch, gating, and re-entrancy live in the importer type's shared module.