import "image/font";
TrueType font scaled and grid fitted to particular size.
static function create(font: Font, size: Float): ScaledFont
function get_font(): Font
function get_size(): Float
function get_ascent(): Float
function get_descent(): Float
function get_height(): Float
function get_char_shape(char: Integer, off_x: Float, off_y: Float): Shape
function get_string_shape(s: String, off_x: Float, off_y: Float): Shape
function get_string_shape(s: String, off: Integer, len: Integer, off_x: Float, off_y: Float): Shape
function append_char_shape(shape: Shape, char: Integer, off_x: Float, off_y: Float)
function append_string_shape(shape: Shape, s: String, off_x: Float, off_y: Float)
function append_string_shape(shape: Shape, s: String, off: Integer, len: Integer, off_x: Float, off_y: Float)
function get_char_bounds(bounds: Float[], char: Integer, off_x: Float, off_y: Float): Float[]
bounds
array of 4 floats (created if null
is passed) and
the array is returned. The order is: min_x, min_y, max_x, max_y.
function get_string_bounds(bounds: Float[], s: String, off_x: Float, off_y: Float): Float[]
function get_string_bounds(bounds: Float[], s: String, off: Integer, len: Integer, off_x: Float, off_y: Float): Float[]
bounds
array of 4 floats (created if null
is passed) and the array is returned. The order is: min_x, min_y, max_x, max_y.
function get_char_advance(char: Integer): Float
function get_string_advance(s: String): Float
function get_string_advance(s: String, off: Integer, len: Integer): Float
function get_string_position(s: String, x: Float): Float
function get_string_position(s: String, off: Integer, len: Integer, x: Float): Float