Note: this is called / shared by both the stb_truetype and the FreeType builder
| 2757 | |
| 2758 | // Note: this is called / shared by both the stb_truetype and the FreeType builder |
| 2759 | void ImFontAtlasBuildInit(ImFontAtlas* atlas) |
| 2760 | { |
| 2761 | // Register texture region for mouse cursors or standard white pixels |
| 2762 | if (atlas->PackIdMouseCursors < 0) |
| 2763 | { |
| 2764 | if (!(atlas->Flags & ImFontAtlasFlags_NoMouseCursors)) |
| 2765 | atlas->PackIdMouseCursors = atlas->AddCustomRectRegular(FONT_ATLAS_DEFAULT_TEX_DATA_W * 2 + 1, FONT_ATLAS_DEFAULT_TEX_DATA_H); |
| 2766 | else |
| 2767 | atlas->PackIdMouseCursors = atlas->AddCustomRectRegular(2, 2); |
| 2768 | } |
| 2769 | |
| 2770 | // Register texture region for thick lines |
| 2771 | // 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 |
| 2772 | if (atlas->PackIdLines < 0) |
| 2773 | { |
| 2774 | if (!(atlas->Flags & ImFontAtlasFlags_NoBakedLines)) |
| 2775 | atlas->PackIdLines = atlas->AddCustomRectRegular(IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 2, IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 1); |
| 2776 | } |
| 2777 | } |
| 2778 | |
| 2779 | // This is called/shared by both the stb_truetype and the FreeType builder. |
| 2780 | void ImFontAtlasBuildFinish(ImFontAtlas* atlas) |
no test coverage detected