| 2356 | } |
| 2357 | |
| 2358 | bool ImFontAtlas::Build() |
| 2359 | { |
| 2360 | IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!"); |
| 2361 | |
| 2362 | // Default font is none are specified |
| 2363 | if (ConfigData.Size == 0) |
| 2364 | AddFontDefault(); |
| 2365 | |
| 2366 | // Select builder |
| 2367 | // - Note that we do not reassign to atlas->FontBuilderIO, since it is likely to point to static data which |
| 2368 | // may mess with some hot-reloading schemes. If you need to assign to this (for dynamic selection) AND are |
| 2369 | // using a hot-reloading scheme that messes up static data, store your own instance of ImFontBuilderIO somewhere |
| 2370 | // and point to it instead of pointing directly to return value of the GetBuilderXXX functions. |
| 2371 | const ImFontBuilderIO* builder_io = FontBuilderIO; |
| 2372 | if (builder_io == NULL) |
| 2373 | { |
| 2374 | #ifdef IMGUI_ENABLE_FREETYPE |
| 2375 | builder_io = ImGuiFreeType::GetBuilderForFreeType(); |
| 2376 | #elif defined(IMGUI_ENABLE_STB_TRUETYPE) |
| 2377 | builder_io = ImFontAtlasGetBuilderForStbTruetype(); |
| 2378 | #else |
| 2379 | IM_ASSERT(0); // Invalid Build function |
| 2380 | #endif |
| 2381 | } |
| 2382 | |
| 2383 | // Build |
| 2384 | return builder_io->FontBuilder_Build(this); |
| 2385 | } |
| 2386 | |
| 2387 | void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_brighten_factor) |
| 2388 | { |
nothing calls this directly
no test coverage detected