lovr.data.newRasterizer

Creates a new Rasterizer from a TTF file.


Create a Rasterizer for the default font included with LÖVR (Varela Round).

rasterizer = lovr.data.newRasterizer(size)

Arguments

NameTypeDefaultDescription
sizenumber32 The resolution to render the fonts at, in pixels. Higher resolutions use more memory and processing power but may provide better quality results for some fonts/situations.

Returns

NameTypeDescription
rasterizerRasterizer The new Rasterizer.

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

Arguments

NameTypeDefaultDescription
filenamestring The filename of the font file to load.
sizenumber32 The resolution to render the fonts at, in pixels. Higher resolutions use more memory and processing power but may provide better quality results for some fonts/situations.

Returns

NameTypeDescription
rasterizerRasterizer The new Rasterizer.

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

Arguments

NameTypeDefaultDescription
blobBlob The Blob containing font data.
sizenumber32 The resolution to render the fonts at, in pixels. Higher resolutions use more memory and processing power but may provide better quality results for some fonts/situations.

Returns

NameTypeDescription
rasterizerRasterizer The new Rasterizer.

See also