|
RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
|
shaper.h — bytes-in shaping adapters. More...
Data Structures | |
| struct | rmgui_shaper_run_t |
| Borrowed UTF-8 run. More... | |
| struct | rmgui_shaped_glyph_t |
| One glyph. More... | |
| struct | rmgui_shaper_t |
| Borrowed callback and context; NULL callback selects the simple adapter. More... | |
Typedefs | |
| typedef int(*) | rmgui_shaper_fn(void *user, const rmgui_shaper_run_t *run, rmgui_shaped_glyph_t *output, size_t capacity, size_t *count) |
| Deterministic adapter: NULL output is a sizing query; writes *count only on success, or returns -1 with count/output unchanged. | |
Enumerations | |
| enum | rmgui_shaper_direction_t { RMGUI_SHAPER_LTR , RMGUI_SHAPER_RTL } |
| Direction of one homogeneous shaping run. More... | |
Functions | |
| int | rmgui_shaper_simple (void *user, const rmgui_shaper_run_t *run, rmgui_shaped_glyph_t *output, size_t capacity, size_t *count) |
| Cmap adapter preserving legacy Latin kerning and per-glyph rounding, with full cmap coverage, maximal-subpart UTF-8 replacement, zero-width selectors and UAX #9 L4 mirroring for RTL. | |
| int | rmgui_shaper_shape (const rmgui_shaper_t *shaper, const rmgui_shaper_run_t *run, rmgui_shaped_glyph_t *output, size_t capacity, rmgui_shaped_glyph_t *scratch, size_t scratch_capacity, size_t *count) |
| Calls the supplied adapter (NULL selects simple), validating cluster order, boundaries, face glyph range and nonnegative advances before output commit. | |
shaper.h — bytes-in shaping adapters.
No host shaper is linked implicitly.
| typedef int(*) rmgui_shaper_fn(void *user, const rmgui_shaper_run_t *run, rmgui_shaped_glyph_t *output, size_t capacity, size_t *count) |
Deterministic adapter: NULL output is a sizing query; writes *count only on success, or returns -1 with count/output unchanged.
A non-NULL output needs capacity >= the sizing result. Repeated calls with the same immutable run must agree. No allocation inside an adapter. HarfBuzz hosts can shape into their own preallocated buffer, map byte clusters, and round positions here.
| int rmgui_shaper_simple | ( | void * | user, |
| const rmgui_shaper_run_t * | run, | ||
| rmgui_shaped_glyph_t * | output, | ||
| size_t | capacity, | ||
| size_t * | count ) |
Cmap adapter preserving legacy Latin kerning and per-glyph rounding, with full cmap coverage, maximal-subpart UTF-8 replacement, zero-width selectors and UAX #9 L4 mirroring for RTL.
Does not perform joining or substitution.
| int rmgui_shaper_shape | ( | const rmgui_shaper_t * | shaper, |
| const rmgui_shaper_run_t * | run, | ||
| rmgui_shaped_glyph_t * | output, | ||
| size_t | capacity, | ||
| rmgui_shaped_glyph_t * | scratch, | ||
| size_t | scratch_capacity, | ||
| size_t * | count ) |
Calls the supplied adapter (NULL selects simple), validating cluster order, boundaries, face glyph range and nonnegative advances before output commit.
scratch holds capacity glyphs and may change on refusal. output and scratch must not alias. NULL output queries size and needs no scratch.