.TH "ttypt/lam-font.h" 3 "Version 1.0.0" "liblamina" \" -*- nroff -*- .ad l .nh .SH NAME ttypt/lam-font.h \- Public header for the liblamina bitmap font system\&. .SH SYNOPSIS .br .PP \fR#include \fP .br \fR#include '\&./lam\-ui\&.h'\fP .br .SS "Enumerations" .in +1c .ti -1c .RI "enum " .br .RI "Optional layout flags for lam_font_*_px_ex()\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "uint32_t \fBlam_font_open\fP (const char *png_path, unsigned cell_w, unsigned cell_h, uint8_t first, uint8_t last)" .br .RI "Load a bitmap font from an image file\&. " .ti -1c .RI "uint32_t \fBlam_font_open_ttf\fP (const char *ttf_path, uint32_t px_size)" .br .RI "Load a TrueType/OpenType font via FreeType2\&. " .ti -1c .RI "int \fBlam_font_add_fallback\fP (uint32_t font_ref, uint32_t fallback_ref)" .br .RI "Attach a fallback TTF font for missing codepoints\&. " .ti -1c .RI "int \fBlam_font_is_ttf\fP (uint32_t font_ref)" .br .RI "Return 1 if font_ref is a FreeType TTF/OTF font, 0 otherwise\&. " .ti -1c .RI "uint32_t \fBlam_font_line_height\fP (uint32_t font_ref, uint32_t px_size)" .br .RI "Query the line height (pixels) for a font at a given pixel size\&. " .ti -1c .RI "uint32_t \fBlam_font_ascent\fP (uint32_t font_ref, uint32_t px_size)" .br .RI "Query the typographic ascent (baseline offset from top, pixels)\&. " .ti -1c .RI "void \fBlam_font_close\fP (uint32_t font_ref)" .br .RI "Unload a font and free its resources\&. " .ti -1c .RI "const char * \fBlam_font_draw\fP (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)" .br .RI "Draw text using a loaded font\&. " .ti -1c .RI "const char * \fBlam_font_draw_px\fP (uint32_t font_ref, const char *text, uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, uint32_t px_size, lam_ui_white_space_t white_space, lam_ui_word_break_t word_break)" .br .RI "Draw text at an explicit pixel size (for TTF fonts; falls back to scale for bitmap fonts)\&. " .ti -1c .RI "const char * \fBlam_font_measure\fP (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)" .br .RI "Measure text layout and overflow\&. " .ti -1c .RI "const char * \fBlam_font_measure_px\fP (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 px_size, lam_ui_white_space_t white_space, lam_ui_word_break_t word_break)" .br .RI "Measure text at an explicit pixel size (for TTF fonts; falls back to scale for bitmap fonts)\&. " .ti -1c .RI "const char * \fBlam_font_draw_px_ex\fP (uint32_t font_ref, const char *text, uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, uint32_t px_size, lam_ui_white_space_t white_space, lam_ui_word_break_t word_break, float letter_spacing_px, uint32_t flags)" .br .RI "Draw text at an explicit pixel size with letter-spacing and layout flags\&. " .ti -1c .RI "const char * \fBlam_font_measure_px_ex\fP (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 px_size, lam_ui_white_space_t white_space, lam_ui_word_break_t word_break, float letter_spacing_px, uint32_t flags)" .br .RI "Measure text at an explicit pixel size with letter-spacing and layout flags\&. " .in -1c .SH "Detailed Description" .PP Public header for the liblamina bitmap font system\&. Declares the API for loading, measuring and rendering bitmap-based fonts used by the liblamina rendering layer\&. .SH "Author" .PP Generated automatically by Doxygen for liblamina from the source code\&.