Note: this is called / shared by both the stb_truetype and the FreeType builder
| 2809 | |
| 2810 | // Note: this is called / shared by both the stb_truetype and the FreeType builder |
| 2811 | void ImFontAtlasBuildInit(ImFontAtlas* atlas) |
| 2812 | { |
| 2813 | // Register texture region for mouse cursors or standard white pixels |
| 2814 | if (atlas->PackIdMouseCursors < 0) |
| 2815 | { |
| 2816 | if (!(atlas->Flags & ImFontAtlasFlags_NoMouseCursors)) |
| 2817 | atlas->PackIdMouseCursors = atlas->AddCustomRectRegular(FONT_ATLAS_DEFAULT_TEX_DATA_W * 2 + 1, FONT_ATLAS_DEFAULT_TEX_DATA_H); |
| 2818 | else |
| 2819 | atlas->PackIdMouseCursors = atlas->AddCustomRectRegular(2, 2); |
| 2820 | } |
| 2821 | |
| 2822 | // Register texture region for thick lines |
| 2823 | // The +2 here is to give space for the end caps, whilst height +1 is to accommodate the fact we have a zero-width row |
| 2824 | if (atlas->PackIdLines < 0) |
| 2825 | { |
| 2826 | if (!(atlas->Flags & ImFontAtlasFlags_NoBakedLines)) |
| 2827 | atlas->PackIdLines = atlas->AddCustomRectRegular(IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 2, IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 1); |
| 2828 | } |
| 2829 | } |
| 2830 | |
| 2831 | // This is called/shared by both the stb_truetype and the FreeType builder. |
| 2832 | void ImFontAtlasBuildFinish(ImFontAtlas* atlas) |
no test coverage detected