MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / IsGlyphRangeUnused

Method IsGlyphRangeUnused

ImGUI GLFW Tutorial/imgui/imgui_draw.cpp:3187–3196  ·  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

3185// API is designed this way to avoid exposing the 4K page size
3186// e.g. use with IsGlyphRangeUnused(0, 255)
3187bool ImFont::IsGlyphRangeUnused(unsigned int c_begin, unsigned int c_last)
3188{
3189 unsigned int page_begin = (c_begin / 4096);
3190 unsigned int page_last = (c_last / 4096);
3191 for (unsigned int page_n = page_begin; page_n <= page_last; page_n++)
3192 if ((page_n >> 3) < sizeof(Used4kPagesMap))
3193 if (Used4kPagesMap[page_n >> 3] & (1 << (page_n & 7)))
3194 return false;
3195 return true;
3196}
3197
3198void ImFont::SetGlyphVisible(ImWchar c, bool visible)
3199{

Callers 1

NodeFontFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected