1681-engine / index / installLabelFont
Function: installLabelFont() ​
ts
function installLabelFont(
fontFamily,
size,
color,
stroke,
strokeWidth,
resolution,
glyphs?
): string;Defined in: src/core/BitmapLabel.ts:37
Rasterises one label font once and returns its name. Called ahead of time for the damage numbers: baking a font on its first number froze the first frame that printed one by ~60 ms. glyphs are letters this font bakes besides ASCII and addLabelGlyphs' (a font with its own is a font of its own: pass the same glyphs wherever it is used).
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
fontFamily | string | undefined |
size | number | undefined |
color | string | undefined |
stroke | string | undefined |
strokeWidth | number | undefined |
resolution | number | undefined |
glyphs | string | '' |
Returns ​
string