MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / IsGlyphRangeUnused

Method IsGlyphRangeUnused

plugins/Cardinal/src/DearImGui/imgui_draw.cpp:3224–3233  ·  view source on GitHub ↗

API is designed this way to avoid exposing the 4K page size e.g. use with IsGlyphRangeUnused(0, 255)

Source from the content-addressed store, hash-verified

3222// API is designed this way to avoid exposing the 4K page size
3223// e.g. use with IsGlyphRangeUnused(0, 255)
3224bool ImFont::IsGlyphRangeUnused(unsigned int c_begin, unsigned int c_last)
3225{
3226 unsigned int page_begin = (c_begin / 4096);
3227 unsigned int page_last = (c_last / 4096);
3228 for (unsigned int page_n = page_begin; page_n <= page_last; page_n++)
3229 if ((page_n >> 3) < sizeof(Used4kPagesMap))
3230 if (Used4kPagesMap[page_n >> 3] & (1 << (page_n & 7)))
3231 return false;
3232 return true;
3233}
3234
3235void ImFont::SetGlyphVisible(ImWchar c, bool visible)
3236{

Callers 1

DebugNodeFontMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected