Log inGet started

.font asset type

Updated 22 August 2026

A font is a general CPU resource usable by any text surface. The onRegister hook calls the engine font.register(name, bytes) primitive, which installs the parsed face into both the 2D/3D text system (text.*) and the egui UI text system, under the family name the font file itself reports. A registration is what puts the face in the database; whether fontFamily = "<name>" selects it is the separate question of whether the shaper matches that name, and font.reconcile() answers it per family:

for _, f in ipairs(font.reconcile()) do
    if not f.selectable then
        print(f.family .. " is registered but shapes as " .. f.shapedWith)
    end
end

text.face(handle) gives the same answer for one label. A family the shaper's database holds is selectable under its own weights and for the glyphs its faces cover: a row that reads familyCoveredNoGlyph names a family the shaper picks whose faces have no glyph for the text asked of it. topics/text covers reading a label that came out in the wrong face.

Fonts are CPU resources (not GPU), so the primitive lives in the font.* namespace, the CPU analogue of renderer.texture.create.

Layout

<name>.font/
  <name>.ttf        the font file (or .otf / .woff / .woff2)
  README.md         human note
  • asset-type
  • reference