lovr.data.newRasterizer

Creates a new Rasterizer from a TTF file.

rasterizer = lovr.data.newRasterizer(filename, size)

Arguments

NameTypeDefaultDescription
filenamestringThe filename of the font file to load.
sizenumber32The resolution to render the fonts at, in pixels.

Returns

NameTypeDescription
rasterizerRasterizerThe new Rasterizer.

rasterizer = lovr.data.newRasterizer(blob, size)

Arguments

NameTypeDefaultDescription
blobBlobThe Blob containing font data.
sizenumber32The resolution to render the fonts at, in pixels.

Returns

NameTypeDescription
rasterizerRasterizerThe new Rasterizer.

See also