MCPcopy Create free account
hub / github.com/cococry/leif / lf_text_dimension_ex

Function lf_text_dimension_ex

leif.c:2818–2824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2816}
2817
2818vec2s lf_text_dimension_ex(const char* str, float wrap_point) {
2819 LfFont font = get_current_font();
2820 LfTextProps props = lf_text_render((vec2s){0.0f, 0.0f}, str, font, state.theme.text_props.text_color, wrap_point,
2821 (vec2s){-1, -1}, true, false, -1, -1);
2822
2823 return (vec2s){(float)props.width, (float)props.height};
2824}
2825
2826vec2s lf_text_dimension_wide(const wchar_t* str) {
2827 return lf_text_dimension_wide_ex(str, -1);

Callers 1

lf_text_dimensionFunction · 0.85

Calls 2

get_current_fontFunction · 0.85
lf_text_renderFunction · 0.85

Tested by

no test coverage detected