MCPcopy Create free account
hub / github.com/Raais/ImStudio / Build

Method Build

src/third-party/imgui/imgui_draw.cpp:2260–2287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2258}
2259
2260bool ImFontAtlas::Build()
2261{
2262 IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
2263
2264 // Default font is none are specified
2265 if (ConfigData.Size == 0)
2266 AddFontDefault();
2267
2268 // Select builder
2269 // - Note that we do not reassign to atlas->FontBuilderIO, since it is likely to point to static data which
2270 // may mess with some hot-reloading schemes. If you need to assign to this (for dynamic selection) AND are
2271 // using a hot-reloading scheme that messes up static data, store your own instance of ImFontBuilderIO somewhere
2272 // and point to it instead of pointing directly to return value of the GetBuilderXXX functions.
2273 const ImFontBuilderIO* builder_io = FontBuilderIO;
2274 if (builder_io == NULL)
2275 {
2276#ifdef IMGUI_ENABLE_FREETYPE
2277 builder_io = ImGuiFreeType::GetBuilderForFreeType();
2278#elif defined(IMGUI_ENABLE_STB_TRUETYPE)
2279 builder_io = ImFontAtlasGetBuilderForStbTruetype();
2280#else
2281 IM_ASSERT(0); // Invalid Build function
2282#endif
2283 }
2284
2285 // Build
2286 return builder_io->FontBuilder_Build(this);
2287}
2288
2289void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_brighten_factor)
2290{

Callers

nothing calls this directly

Tested by

no test coverage detected