MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / AddFontFromMemoryCompressedBase85TTF

Method AddFontFromMemoryCompressedBase85TTF

include/imgui/imgui_draw.cpp:3276–3284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3274}
3275
3276ImFont* ImFontAtlas::AddFontFromMemoryCompressedBase85TTF(const char* compressed_ttf_data_base85, float size_pixels, const ImFontConfig* font_cfg, const ImWchar* glyph_ranges)
3277{
3278 int compressed_ttf_size = (((int)ImStrlen(compressed_ttf_data_base85) + 4) / 5) * 4;
3279 void* compressed_ttf = IM_ALLOC((size_t)compressed_ttf_size);
3280 Decode85((const unsigned char*)compressed_ttf_data_base85, (unsigned char*)compressed_ttf);
3281 ImFont* font = AddFontFromMemoryCompressedTTF(compressed_ttf, compressed_ttf_size, size_pixels, font_cfg, glyph_ranges);
3282 IM_FREE(compressed_ttf);
3283 return font;
3284}
3285
3286// On font removal we need to remove references (otherwise we could queue removal?)
3287// We allow old_font == new_font which forces updating all values (e.g. sizes)

Callers

nothing calls this directly

Calls 1

Decode85Function · 0.85

Tested by

no test coverage detected