Callback table for a host-supplied font rasterizer (for example, browser Canvas 2D or a native OS text stack) used with rmgui_font_init_provider.
More...
#include <font.h>
|
| int | ascent |
| int | descent |
| int(*) | advance (void *user, uint32_t codepoint) |
| int(*) | kern (void *user, uint32_t left_cp, uint32_t right_cp) |
| int(*) | glyph_box (void *user, uint32_t codepoint, int pixel_height, int *x0, int *y0, int *x1, int *y1) |
| int(*) | render (void *user, uint32_t codepoint, int pixel_height, unsigned char *out, int width, int height, int stride) |
Callback table for a host-supplied font rasterizer (for example, browser Canvas 2D or a native OS text stack) used with rmgui_font_init_provider.
ascent (positive) and descent (negative) define the face's vertical font units with ascent > descent. advance, glyph_box, and render are required; kern is optional (NULL disables kerning). glyph_box and render receive the Unicode codepoint (U+0020..U+FFFF) and target pixel_height, writing an 8-bit coverage bitmap into out with row stride stride.
◆ ascent
| int rmgui_font_provider_t::ascent |
◆ descent
| int rmgui_font_provider_t::descent |
◆ advance
| int(*) rmgui_font_provider_t::advance(void *user, uint32_t codepoint) |
◆ kern
| int(*) rmgui_font_provider_t::kern(void *user, uint32_t left_cp, uint32_t right_cp) |
◆ glyph_box
| int(*) rmgui_font_provider_t::glyph_box(void *user, uint32_t codepoint, int pixel_height, int *x0, int *y0, int *x1, int *y1) |
◆ render
| int(*) rmgui_font_provider_t::render(void *user, uint32_t codepoint, int pixel_height, unsigned char *out, int width, int height, int stride) |
The documentation for this struct was generated from the following file: