installBitmapFont
installBitmapFont(
source,opts):Promise<string>
Defined in: renderer/src/assets.ts:448
Load a .ttf/.woff and bake a bitmap glyph atlas from it via Pixi v8’s
BitmapFont.install. Returns the registered font name, ready to hand to
style.fontFamily (with bitmap: true) on UIText / TextComponent. Pair
with uninstallBitmapFont to free the atlas when it’s no longer used.
const font = await installBitmapFont("fonts/PressStart2P.ttf", { name: "PressStart", size: 16,});entity.add( new TextComponent({ text: "READY", bitmap: true, style: { fontFamily: font } }),);Parameters
Section titled “Parameters”source
Section titled “source”string | AssetHandle<unknown>
Returns
Section titled “Returns”Promise<string>
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/renderer.md.