RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
Loading...
Searching...
No Matches
rmgui_font_metrics_t Struct Reference

Mutable measurement/drawing context, owned by one thread at a time. More...

#include <font.h>

Data Structures

struct  [struct].pairs
struct  [struct].tokens

Data Fields

const rmgui_font_t * font
const rmgui_font_t * cached_font
const unsigned char * face_data
int font_px
struct  pairs [RMGUI_FONT_METRICS_PAIRS]
struct  tokens [RMGUI_FONT_METRICS_TOKENS]

Detailed Description

Mutable measurement/drawing context, owned by one thread at a time.

The borrowed font remains read-only during measurement. Initialize before use and again after reinstalling its face (including reinstalling different bytes at the same address). Switching font pointers or pixel sizes automatically empties both caches. A font change must also invalidate any layout that borrows this context: reinstall it with rmgui_layout_set_font_metrics or rmgui_layout_set_text_binding. Members other than font are private. No allocation is performed.

Field Documentation

◆ font

const rmgui_font_t* rmgui_font_metrics_t::font

◆ cached_font

const rmgui_font_t* rmgui_font_metrics_t::cached_font

◆ face_data

const unsigned char* rmgui_font_metrics_t::face_data

◆ font_px

int rmgui_font_metrics_t::font_px

◆ pairs

◆ tokens


The documentation for this struct was generated from the following file: