| 1370 | } |
| 1371 | |
| 1372 | void ImFontAtlas::ClearInputData() |
| 1373 | { |
| 1374 | for (int i = 0; i < ConfigData.Size; i++) |
| 1375 | if (ConfigData[i].FontData && ConfigData[i].FontDataOwnedByAtlas) |
| 1376 | { |
| 1377 | ImGui::MemFree(ConfigData[i].FontData); |
| 1378 | ConfigData[i].FontData = NULL; |
| 1379 | } |
| 1380 | |
| 1381 | // When clearing this we lose access to the font name and other information used to build the font. |
| 1382 | for (int i = 0; i < Fonts.Size; i++) |
| 1383 | if (Fonts[i]->ConfigData >= ConfigData.Data && Fonts[i]->ConfigData < ConfigData.Data + ConfigData.Size) |
| 1384 | { |
| 1385 | Fonts[i]->ConfigData = NULL; |
| 1386 | Fonts[i]->ConfigDataCount = 0; |
| 1387 | } |
| 1388 | ConfigData.clear(); |
| 1389 | CustomRects.clear(); |
| 1390 | for (int n = 0; n < IM_ARRAYSIZE(CustomRectIds); n++) |
| 1391 | CustomRectIds[n] = -1; |
| 1392 | } |
| 1393 | |
| 1394 | void ImFontAtlas::ClearTexData() |
| 1395 | { |