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