Generate a single-channel bitmap for an individual character of a given font
OTHER License
Generate a single-channel bitmap for an individual character of a given font.
data = letter(char, font, size, [context])
Returns a 2D Float32Array
containing the font data, on a scale from 0 (empty)
to 255 (solid).
char
is the character you want to render.font
is the font family you'd like to use.size
is the total width/height of the canvas, in pixels. The final datasize * size
.context
is an optional 2D canvas context to use. Note that this will messMIT. See LICENSE.md for details.