When atlas->RendererHasTextures = true, this is only called if no font were loaded.
| 3361 | |
| 3362 | // When atlas->RendererHasTextures = true, this is only called if no font were loaded. |
| 3363 | void ImFontAtlasBuildMain(ImFontAtlas* atlas) |
| 3364 | { |
| 3365 | IM_ASSERT(!atlas->Locked && "Cannot modify a locked ImFontAtlas!"); |
| 3366 | if (atlas->TexData && atlas->TexData->Format != atlas->TexDesiredFormat) |
| 3367 | ImFontAtlasBuildClear(atlas); |
| 3368 | |
| 3369 | if (atlas->Builder == NULL) |
| 3370 | ImFontAtlasBuildInit(atlas); |
| 3371 | |
| 3372 | // Default font is none are specified |
| 3373 | if (atlas->Sources.Size == 0) |
| 3374 | atlas->AddFontDefault(); |
| 3375 | |
| 3376 | // [LEGACY] For backends not supporting RendererHasTextures: preload all glyphs |
| 3377 | ImFontAtlasBuildUpdateRendererHasTexturesFromContext(atlas); |
| 3378 | if (atlas->RendererHasTextures == false) // ~ImGuiBackendFlags_RendererHasTextures |
| 3379 | ImFontAtlasBuildLegacyPreloadAllGlyphRanges(atlas); |
| 3380 | atlas->TexIsBuilt = true; |
| 3381 | } |
| 3382 | |
| 3383 | void ImFontAtlasBuildGetOversampleFactors(ImFontConfig* src, ImFontBaked* baked, int* out_oversample_h, int* out_oversample_v) |
| 3384 | { |
no test coverage detected