kb_text_shape (v2.10, JimmyLefevre) had been LOST from the sx tree — ffi/stb_truetype.sx referenced repo paths that no longer existed (and nothing runs glyph_cache, so the dangling unit never fired). The trimmed copy returns from the m3te project as a proper vendor: curated c/kbts_api.h decls over the full upstream header, README with provenance, and examples/1627 pinning context + font creation so the unit compiles and runs in-suite. file_utils (in-house asset-read helper with the Android AAssetManager hook) gets the same unit shape. modules/ffi/stb_truetype.sx is gone: glyph_cache imports the three vendored units (stb_truetype, kb_text_shape, file_utils) directly.
16 lines
911 B
C
16 lines
911 B
C
// Minimal API declarations for SX import.
|
|
// Only the functions/types we actually use — avoids parsing the full 30k-line header.
|
|
|
|
typedef struct kbts_shape_context kbts_shape_context;
|
|
typedef struct kbts_font kbts_font;
|
|
|
|
kbts_shape_context *kbts_CreateShapeContext(void *Allocator, void *AllocatorData);
|
|
void kbts_DestroyShapeContext(kbts_shape_context *Context);
|
|
kbts_font *kbts_ShapePushFontFromMemory(kbts_shape_context *Context, void *Memory, int Size, int FontIndex);
|
|
void kbts_GetFontInfo2(kbts_font *Font, void *Info);
|
|
void kbts_ShapeBegin(kbts_shape_context *Context, unsigned int ParagraphDirection, unsigned int Language);
|
|
void kbts_ShapeUtf8(kbts_shape_context *Context, const char *Utf8, int Length, unsigned int UserIdGenerationMode);
|
|
void kbts_ShapeEnd(kbts_shape_context *Context);
|
|
int kbts_ShapeRun(kbts_shape_context *Context, void *Run);
|
|
int kbts_GlyphIteratorNext(void *It, void **Glyph);
|