FontResource
One font constant, two faces:
Interface: FontResource<ID>
Defined in: packages/motion/src/Font.ts:63
One font constant, two faces:
- author side:
yield*it in a scene to get the Font value forfontFamily, addingFontLoader<ID>to the scene's requirements. The requirement is PHANTOM — the effect succeeds without touching context, soScene.run/streamstay loader-free and only the render path (the first actual consumer of bytes) demands the loader. - provider side:
.Loaderis the context key; pair it with layer to provide bytes.
Extends
Effect<Font<ID>,never,FontLoader<ID>>
Type Parameters
| Type Parameter | Default type |
|---|---|
ID extends string | string |
Properties
id
readonly id: ID;Defined in: packages/motion/src/Font.ts:65
Loader
readonly Loader: Service<FontLoader<ID>, FontLoader<ID>>;Defined in: packages/motion/src/Font.ts:66