Populate a <canvas> element with a font texture atlas
npm install font-atlas element with a font texture atlas – can be used to quickly generate bitmap fonts.
element with a font texture atlas. Takes
canvas: use an existing element. By default, a new one will
font: the font family to use when drawing the text. Can be a css font string or an object with font properties: size, family, style, weight, variant, stretch.
shape: an array containing the [width, height] for the canvas in pixels.
[512, 512].
step: an array containing the [width, height] for each cell in pixels.
[32, 32].
chars: may be one of either:
[start, end] character codes to use. By default,
[32, 126].