effect-motion
API Referenceeffect-motionNamespacesFontInterfaces

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 for fontFamily, adding FontLoader<ID> to the scene's requirements. The requirement is PHANTOM — the effect succeeds without touching context, so Scene.run/stream stay loader-free and only the render path (the first actual consumer of bytes) demands the loader.
  • provider side: .Loader is the context key; pair it with layer to provide bytes.

Extends

Type Parameters

Type ParameterDefault type
ID extends stringstring

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

On this page