Skip to content
pixi-silk
GitHub repository
Interface

CanvasFont

import type { CanvasFont } from 'pixi-silk/i18n/canvas';

A font to download for text slots, instead of the system font.

Properties#

PropertyTypeDescriptionDefined in
familystringCSS family name to register it under.packages/pixi-silk/src/i18n/canvas.ts:10
sourcestringURL of the font file. Prefer a subset with the scripts the slot needs.packages/pixi-silk/src/i18n/canvas.ts:12
weight?numberCSS weight of the file. Default 400.packages/pixi-silk/src/i18n/canvas.ts:14