MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / IsGlyphRangeUnused

Method IsGlyphRangeUnused

extern/imgui/imgui_draw.cpp:3236–3245  ·  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

3234// API is designed this way to avoid exposing the 4K page size
3235// e.g. use with IsGlyphRangeUnused(0, 255)
3236bool ImFont::IsGlyphRangeUnused(unsigned int c_begin, unsigned int c_last)
3237{
3238 unsigned int page_begin = (c_begin / 4096);
3239 unsigned int page_last = (c_last / 4096);
3240 for (unsigned int page_n = page_begin; page_n <= page_last; page_n++)
3241 if ((page_n >> 3) < sizeof(Used4kPagesMap))
3242 if (Used4kPagesMap[page_n >> 3] & (1 << (page_n & 7)))
3243 return false;
3244 return true;
3245}
3246
3247void ImFont::SetGlyphVisible(ImWchar c, bool visible)
3248{

Callers 1

DebugNodeFontMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected