Cobbletext
0.2.0
Complex text layout and rendering engine
|
Go to the documentation of this file.
111 const char * text, int32_t length);
void cobbletext_engine_rasterize(CobbletextEngine *engine)
Convert the glyphs required by this engine to coverages maps for drawing the text.
void cobbletext_engine_clear(CobbletextEngine *engine)
Empty the text buffer.
Representation of a pen drawing instruction.
Definition: advance_info.h:66
Sizes for the rendered text.
Definition: output_info.h:23
void cobbletext_engine_set_properties(CobbletextEngine *engine, const struct CobbletextEngineProperties *properties)
Sets engine properties.
void cobbletext_engine_delete(CobbletextEngine *engine)
Frees the engine.
uint32_t CobbletextInlineObjectID
A user-provided identifer for inline objects.
Definition: common.h:38
const struct CobbletextEngineProperties * cobbletext_engine_get_properties(CobbletextEngine *engine)
Returns the engine properties.
bool cobbletext_engine_tiles_valid(CobbletextEngine *engine)
Returns whether the associated glyphs to this engine is not stale.
bool cobbletext_engine_pack_tiles(CobbletextEngine *engine, uint32_t width, uint32_t height)
Texture pack the associated glyphs.
const struct CobbletextAdvanceInfo ** cobbletext_engine_get_advances(CobbletextEngine *engine)
Return the advances array.
struct CobbletextLibrary CobbletextLibrary
Opaque handle to the library's context.
Definition: library.h:24
uint8_t CobbletextEncoding
Specifies the encoding of bytes.
Definition: encoding.h:17
uint32_t cobbletext_engine_get_tile_count(CobbletextEngine *engine)
Returns the number of tiles in the tiles array.
const struct CobbletextTileInfo ** cobbletext_engine_get_tiles(CobbletextEngine *engine)
Returns the array of tiles.
Properties for text runs on a struct CobbletextEngine instance.
Definition: text_properties.h:13
Properties for controlling output parameters on a struct CobbletextEngine instance.
Definition: engine_properties.h:15
void cobbletext_engine_set_text_properties(CobbletextEngine *engine, const struct CobbletextTextProperties *text_properties)
Sets the current text properties.
uint32_t cobbletext_engine_get_advance_count(CobbletextEngine *engine)
Return the number advances in the advances array.
void cobbletext_engine_clear_tiles(CobbletextEngine *engine)
Clear associated tiles and glyphs.
void cobbletext_engine_prepare_tiles(CobbletextEngine *engine)
Prepares an array of tiles required for getting glyph images.
Representation of a rendered glyph for an #CobbletextEngine.
Definition: tile_info.h:12
void cobbletext_engine_add_text_utf16(CobbletextEngine *engine, const CobbletextChar16 *text, int32_t length)
Append UTF-16 code units to the text buffer.
struct CobbletextEngine CobbletextEngine
Opaque handle to a layout and render engine.
Definition: engine.h:30
const struct CobbletextOutputInfo * cobbletext_engine_get_output_info(CobbletextEngine *engine)
Returns information about the lay out operation.
#define COBBLETEXT_API
Macro for Windows C symbol import and export, Emscripten attribute.
Definition: macros.h:18
void cobbletext_engine_prepare_advances(CobbletextEngine *engine)
Prepare an array of advances required for positioning glyphs.
char16_t CobbletextChar16
Definition: uchar_helper.h:6
CobbletextEngine * cobbletext_engine_new(CobbletextLibrary *library)
Creates a new layout engine.
void cobbletext_engine_lay_out(CobbletextEngine *engine)
Process and shape the text.
void cobbletext_engine_add_inline_object(CobbletextEngine *engine, CobbletextInlineObjectID id, uint32_t width, uint32_t height)
Append a placeholder for an object to the text buffer.
char32_t CobbletextChar32
Definition: uchar_helper.h:7
const struct CobbletextTextProperties * cobbletext_engine_get_text_properties(CobbletextEngine *engine)
Returns the current text properties.
void cobbletext_engine_add_text_utf8(CobbletextEngine *engine, const char *text, int32_t length)
Append UTF-8 code units to the text buffer.
void cobbletext_engine_add_text(CobbletextEngine *engine, const uint8_t *data, int32_t length, CobbletextEncoding encoding)
Append encoded bytes to the text buffer.
void cobbletext_engine_add_text_utf32(CobbletextEngine *engine, const CobbletextChar32 *text, int32_t length)
Append UTF-32 code units to the text buffer.