Vital.sandbox
Font

self:set_oversampling

Client

Sets the oversampling factor of the font


Syntax

local status = self:set_oversampling(oversampling)

Parameters

TypeNameDescription
floatoversamplingOversampling factor for the font. A value of 1.0 is the default with no oversampling. Higher values improve sharpness when the font is scaled or transformed at the cost of memory

Returns

TypeNameDescription
boolstatustrue on successful execution, or false on failure

Examples

Set the oversampling factor of a font
local fontface = font.create("fonts/Roboto-Regular.ttf")

--Customize oversampling
fontface:set_oversampling(2.0)

On this page