Cobbletext
0.2.0
Complex text layout and rendering engine
|
void cobbletext_library_set_font_alternative(CobbletextLibrary *library, CobbletextFontID font_id, CobbletextFontID fallback_font_id)
Sets an alternative font to be used if glyphs are not in the font.
Glyph properties.
Definition: glyph_info.h:12
const char * cobbletext_get_error_message(CobbletextLibrary *library)
Returns a textual version of the error code.
CobbletextFontID cobbletext_library_get_fallback_font(CobbletextLibrary *library)
Returns the ID for the built-in fallback font when there is no font loaded.
void cobbletext_library_delete(CobbletextLibrary *library)
Frees a library context.
void cobbletext_clear_error(CobbletextLibrary *library)
Clears any error code or error message.
struct CobbletextLibrary CobbletextLibrary
Opaque handle to the library's context.
Definition: library.h:24
CobbletextFontID cobbletext_library_get_font_alternative(CobbletextLibrary *library, CobbletextFontID font_id)
Returns the alternative font for the given font.
uint32_t CobbletextFontID
Unique font face ID.
Definition: common.h:18
CobbletextFontID cobbletext_library_load_font(CobbletextLibrary *library, const char *path)
Loads a font face from a file.
const struct CobbletextFontInfo * cobbletext_library_get_font_info(CobbletextLibrary *library, CobbletextFontID font)
Returns information about a loaded font.
CobbletextFontID cobbletext_library_load_font_bytes(CobbletextLibrary *library, const uint8_t *data, uint32_t length, int32_t face_index)
Loads a font face from the given bytes of a font file.
#define COBBLETEXT_API
Macro for Windows C symbol import and export, Emscripten attribute.
Definition: macros.h:18
CobbletextLibrary * cobbletext_library_new()
Returns a new library context.
Font face properties.
Definition: font_info.h:12
int32_t cobbletext_get_error_code(CobbletextLibrary *library)
Returns error code.
const struct CobbletextGlyphInfo * cobbletext_library_get_glyph_info(CobbletextLibrary *library, CobbletextFontID glyph)
Returns information about a glyph from a loaded font.