API is designed this way to avoid exposing the 4K page size e.g. use with IsGlyphRangeUnused(0, 255)
| 3185 | // API is designed this way to avoid exposing the 4K page size |
| 3186 | // e.g. use with IsGlyphRangeUnused(0, 255) |
| 3187 | bool 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 | |
| 3198 | void ImFont::SetGlyphVisible(ImWchar c, bool visible) |
| 3199 | { |