Compute text crop area for text using a single font.
text_line_metrics(const font_info &info)
auto get_line_count(const bx::StringView &str) const -> uint32_t
Return the number of text line in the given text.
auto get_line_height() const -> float
Return the height of a line of text using the given font.
void get_sub_text(const bx::StringView &str, uint32_t first_line, uint32_t last_line, const char *&begin, const char *&end)
Return the first and last character visible in the [first_line, last_line] range.
auto get_width() const -> float
Return the width of the measured text.
auto get_height() const -> float
Return the height of the measured text.
auto clear_text() -> void
Clear the width and height of the measured text.
auto append_text(font_handle handle, const wchar_t *str, const wchar_t *end=nullptr) -> void
Append a wide char string to the metrics helper.
auto append_text(font_handle handle, const char *str, const char *end=nullptr) -> void
Append an ASCII/utf-8 string to the metrics helper.
text_metrics(font_manager *manager)