---
title: ".font asset type"
description: "A .font is a first-class font asset: font-file bytes (TTF / OTF / WOFF / WOFF2) converted into a guid-anchored asset via asset.create(\"font\", name, { bytes = … })."
section: "Types"
slug: "types-font"
canonical: "https://origozero.ai/docs/types-font"
updated: "2026-08-22T07:41:55.975523568+00:00"
tags: ["asset-type", "reference"]
---

# .font asset type

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:

```lua
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
```
