NAME
lam_font_render - liblamina font rendering and measurement
- Functions for drawing and measuring text.
SYNOPSIS
Enumerations
Optional layout flags for lam_font_*_px_ex().
Functions
Draw text using a loaded font.
Draw text at an explicit pixel size (for TTF fonts; falls back to scale for bitmap fonts).
Measure text layout and overflow.
Measure text at an explicit pixel size (for TTF fonts; falls back to scale for bitmap fonts).
Draw text at an explicit pixel size with letter-spacing and layout flags.
Measure text at an explicit pixel size with letter-spacing and layout flags.
Detailed Description
Functions for drawing and measuring text.
Function Documentation
const char * lam_font_draw (uint32_t font_ref, const char * text, uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, uint32_t scale, lam_ui_white_space_t white_space, lam_ui_word_break_t word_break)
Draw text using a loaded font. Renders text within the given rectangle, obeying wrapping and breaking rules. Returns a pointer to the first unrendered character if overflow occurred.
Parameters
font_ref Font handle.
text UTF-8 text to render.
x0,y0 Top-left position (pixels).
x1,y1 Bottom-right boundary (pixels).
scale Font scale factor (1 = base size).
white_space White-space handling mode (see lam_ui_white_space_t).
word_break Word-break behavior (see lam_ui_word_break_t).
Returns
NULL if fully rendered, or pointer to remaining text.
const char * lam_font_measure (uint32_t * out_w, uint32_t * out_h, uint32_t font_ref, const char * text, uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, uint32_t scale, lam_ui_white_space_t white_space, lam_ui_word_break_t word_break)
Measure text layout and overflow. Computes how text fits within the specified rectangle and returns a pointer to the first unrendered character if overflow occurred.
Parameters
out_w Optional: resulting text width in pixels.
out_h Optional: resulting text height in pixels.
font_ref Font handle.
text UTF-8 text to measure.
x0,y0 Top-left position (pixels).
x1,y1 Bottom-right boundary (pixels).
scale Font scale factor.
white_space White-space handling mode (see lam_ui_white_space_t).
word_break Word-break behavior (see lam_ui_word_break_t).
Returns
NULL if text fully fits, or pointer to remaining text.
Author
Generated automatically by Doxygen for liblamina from the source code.