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