> home > Custom Layer Boundary API

get_string_advance

September 8th 2024
Compute the total advance of a string rendered in a particular font

Signature

C++
f32
get_string_advance(Application_Links* app,
                   Face_ID font_id,
                   String_Const_u8 str);

Parameters

app

the standard custom layer context pointer

font_id

the id of the face to use rendering the text

str

the text to be rendered

Return

the total advance of the string