registerFont
function registerFont(
Function: registerFont()
function registerFont(
text,
id,
bytes): Effect<void, EffectMotionError>;Defined in: packages/renderer/src/Text.ts:66
Load a font's bytes under its id.
Parameters
| Parameter | Type |
|---|---|
text | Text |
id | string |
bytes | Uint8Array |
Returns
Effect<void, EffectMotionError>
Remarks
Idempotent per id — registering the same font twice does nothing the
second time. A font must be registered before any string using it can be
laid out; Sync.resolveResources handles that for frames. Effectful
because font parsing initializes WASM shaping state.