MCPcopy Create free account
hub / github.com/RenderKit/embree / Decode85

Function Decode85

tutorials/common/imgui/imgui_draw.cpp:2102–2111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2100static const char* GetDefaultCompressedFontDataTTFBase85();
2101static unsigned int Decode85Byte(char c) { return c >= '\\' ? c-36 : c-35; }
2102static void Decode85(const unsigned char* src, unsigned char* dst)
2103{
2104 while (*src)
2105 {
2106 unsigned int tmp = Decode85Byte(src[0]) + 85 * (Decode85Byte(src[1]) + 85 * (Decode85Byte(src[2]) + 85 * (Decode85Byte(src[3]) + 85 * Decode85Byte(src[4]))));
2107 dst[0] = ((tmp >> 0) & 0xFF); dst[1] = ((tmp >> 8) & 0xFF); dst[2] = ((tmp >> 16) & 0xFF); dst[3] = ((tmp >> 24) & 0xFF); // We can't assume little-endianness.
2108 src += 5;
2109 dst += 4;
2110 }
2111}
2112
2113// Load embedded ProggyClean.ttf at size 13, disable oversampling
2114ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)

Calls 1

Decode85ByteFunction · 0.85

Tested by

no test coverage detected