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
sizenumber32The 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
rasterizerRasterizerThe new Rasterizer.

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. Higher resolutions use more memory and processing power but may provide better quality results for some fonts/situations.

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. Higher resolutions use more memory and processing power but may provide better quality results for some fonts/situations.

Returns

NameTypeDescription
rasterizerRasterizerThe new Rasterizer.

See also