self:set_oversampling

Client

Sets the oversampling factor of the font


Syntax

local status = self:set_oversampling(
    value
)

Parameters

TypeNameDescription
floatvalueOversampling 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, false otherwise

Examples

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

-- Customize oversampling
entity:set_oversampling(2.0)

On this page