kb-text-shape-0.2.0.0: cbits/kb_text_shape.c
#include <stdint.h>
#ifdef TRACE_BLOCKS
#define KBTS_INSTRUMENT_BLOCK_BEGIN(Name) printf("<%s>\n", #Name)
#define KBTS_INSTRUMENT_BLOCK_END(Name) printf("</%s>\n", #Name)
#define KBTS_INSTRUMENT_FUNCTION_BEGIN
#define KBTS_INSTRUMENT_FUNCTION_END
#endif
#include "kb_text_shape.h"
#include "kb_text_shape.inc"
void hs_ShapeCurrentCodepointsIterator(kbts_shape_context *Context, kbts_shape_codepoint_iterator *It)
{
*It = kbts__InputCodepointIterator(Context, 0, Context->InputCodepointCount);
}
void hs_CodepointToGlyph(kbts_font *Font, int Codepoint, kbts_glyph_config *Config, int UserId, kbts_glyph *Glyph)
{
*Glyph = kbts_CodepointToGlyph(Font, Codepoint, Config, UserId);
}
void hs_ActiveGlyphIterator(kbts_glyph_storage *Storage, kbts_glyph_iterator *It) {
*It = kbts_ActiveGlyphIterator(Storage);
}
kbts_load_font_error hs_FontFromFile(const char *FileName, int FontIndex, kbts_allocator_function *Allocator, void *AllocatorData, void **FileData, int *FileSize_, kbts_font *Font) {
*Font = kbts_FontFromFile(FileName, FontIndex, Allocator, AllocatorData, FileData, FileSize_);
return Font->Error;
}
kbts_load_font_error hs_FontFromMemory(void *FileData, int FileSize, int FontIndex, kbts_allocator_function *Allocator, void *AllocatorData, kbts_font *Font) {
*Font = kbts_FontFromMemory(FileData, FileSize, FontIndex, Allocator, AllocatorData);
return Font->Error;
}