Rasterizer:newImage

Returns an Image containing a rasterized glyph.


image = Rasterizer:newImage(character, spread, padding)

Arguments

NameTypeDefaultDescription
characterstring A character.
spreadnumber4.0 The width of the distance field, for signed distance field rasterization.
paddingnumberspread / 2 The number of pixels of padding to add at the edges of the image.

Returns

NameTypeDescription
imageImage The glyph image. It will be in the rgba32f format.

image = Rasterizer:newImage(codepoint, spread, padding)

Arguments

NameTypeDefaultDescription
codepointnumber A codepoint.
spreadnumber4.0 The width of the distance field, for signed distance field rasterization.
paddingnumberspread / 2 The number of pixels of padding to add at the edges of the image.

Returns

NameTypeDescription
imageImage The glyph image. It will be in the rgba32f format.

See also