BUILTIN_FONT — a dependency-free 6 × 12 monospace face covering
printable ASCII, with its pixels in source, plus
createBitmapFont, the constructor any other face goes through
(bitmap-font.ts).
buildGlyphAtlas — that face packed into one RGBA8 buffer plus a uv
table (glyph-atlas.ts).
layoutText — a string laid out against an atlas as world-space
quads (text-layout.ts).
import { buildGlyphAtlas } from"fourJS/text"; import { Texture } from"fourJS/render"; import { UnlitMaterial } from"fourJS/materials"; import { Text } from"fourJS"; // not this subpath — see below
This package produces data, never nodes. Its dependencies are core,
math, and geometry (plan §3.1, frozen) — not render, not materials,
not scene — so it cannot construct a Texture, a material, or a Text
node, and it does not try. fourJS/text re-exports this barrel; Text is
not on it. The atlas is emitted in exactly the shape
@fourjs/render's TextureSource accepts, and the layout in the shape a quad
builder wants; the package that owns nodes assembles the two. See
glyph-atlas.ts for why that seam is structural rather than an import.
The package that owns nodes is the umbrella fourJS, since 2026-08-13
(R-28): new Text(atlas, material, { text, size }) is a §49 Renderable
that draws a whole string as one geometry over one atlas material. This
package is still what computes where the glyphs go. layoutText remains
public for callers who want the quads without a node.
@fourjs/text— bitmap text at §56's MVP tier.Three pieces, each usable on its own:
bitmap-font.ts).glyph-atlas.ts).text-layout.ts).This package produces data, never nodes. Its dependencies are
core,math, andgeometry(plan §3.1, frozen) — notrender, notmaterials, notscene— so it cannot construct aTexture, a material, or aTextnode, and it does not try.fourJS/textre-exports this barrel;Textis not on it. The atlas is emitted in exactly the shape@fourjs/render'sTextureSourceaccepts, and the layout in the shape a quad builder wants; the package that owns nodes assembles the two. Seeglyph-atlas.tsfor why that seam is structural rather than an import.The package that owns nodes is the umbrella
fourJS, since 2026-08-13 (R-28):new Text(atlas, material, { text, size })is a §49Renderablethat draws a whole string as one geometry over one atlas material. This package is still what computes where the glyphs go.layoutTextremains public for callers who want the quads without a node.