font_get_sdf_spread

This function returns the spread value used for the given font. The font must be SDF-enabled.

If the font doesn't exist, the function will return -1.

 

Syntax:

font_get_sdf_spread(ind);

ArgumentTypeDescription
indFont AssetThe index of the font for which to get the spread value

 

Returns:

Real

 

Example:

var _spread = font_get_sdf_spread(my_font);
shader_set_uniform_f(uni_spread, _spread);

The above code gets the spread value for a font, and passes it into a shader uniform.