mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-30 22:05:46 +08:00
Fonts: rename to ImFontAtlasBuildLegacyPreloadAllGlyphRanges().
This commit is contained in:
+3
-3
@@ -3368,7 +3368,7 @@ void ImFontAtlasBuildMain(ImFontAtlas* atlas)
|
|||||||
// [LEGACY] For backends not supporting RendererHasTextures: preload all glyphs
|
// [LEGACY] For backends not supporting RendererHasTextures: preload all glyphs
|
||||||
ImFontAtlasBuildUpdateRendererHasTexturesFromContext(atlas);
|
ImFontAtlasBuildUpdateRendererHasTexturesFromContext(atlas);
|
||||||
if (atlas->RendererHasTextures == false) // ~ImGuiBackendFlags_RendererHasTextures
|
if (atlas->RendererHasTextures == false) // ~ImGuiBackendFlags_RendererHasTextures
|
||||||
ImFontAtlasBuildPreloadAllGlyphRanges(atlas);
|
ImFontAtlasBuildLegacyPreloadAllGlyphRanges(atlas);
|
||||||
atlas->TexIsBuilt = true;
|
atlas->TexIsBuilt = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3405,12 +3405,12 @@ void ImFontAtlasBuildSetupFontLoader(ImFontAtlas* atlas, const ImFontLoader* fon
|
|||||||
|
|
||||||
// Preload all glyph ranges for legacy backends.
|
// Preload all glyph ranges for legacy backends.
|
||||||
// This may lead to multiple texture creation which might be a little slower than before.
|
// This may lead to multiple texture creation which might be a little slower than before.
|
||||||
void ImFontAtlasBuildPreloadAllGlyphRanges(ImFontAtlas* atlas)
|
void ImFontAtlasBuildLegacyPreloadAllGlyphRanges(ImFontAtlas* atlas)
|
||||||
{
|
{
|
||||||
atlas->Builder->PreloadedAllGlyphsRanges = true;
|
atlas->Builder->PreloadedAllGlyphsRanges = true;
|
||||||
for (ImFont* font : atlas->Fonts)
|
for (ImFont* font : atlas->Fonts)
|
||||||
{
|
{
|
||||||
ImFontBaked* baked = font->GetFontBaked(font->Sources[0]->SizePixels);
|
ImFontBaked* baked = font->GetFontBaked(font->LegacySize);
|
||||||
if (font->FallbackChar != 0)
|
if (font->FallbackChar != 0)
|
||||||
baked->FindGlyph(font->FallbackChar);
|
baked->FindGlyph(font->FallbackChar);
|
||||||
if (font->EllipsisChar != 0)
|
if (font->EllipsisChar != 0)
|
||||||
|
|||||||
+1
-1
@@ -3807,7 +3807,7 @@ IMGUI_API void ImFontAtlasTextureCompact(ImFontAtlas* atlas);
|
|||||||
IMGUI_API ImVec2i ImFontAtlasTextureGetSizeEstimate(ImFontAtlas* atlas);
|
IMGUI_API ImVec2i ImFontAtlasTextureGetSizeEstimate(ImFontAtlas* atlas);
|
||||||
|
|
||||||
IMGUI_API void ImFontAtlasBuildSetupFontSpecialGlyphs(ImFontAtlas* atlas, ImFont* font, ImFontConfig* src);
|
IMGUI_API void ImFontAtlasBuildSetupFontSpecialGlyphs(ImFontAtlas* atlas, ImFont* font, ImFontConfig* src);
|
||||||
IMGUI_API void ImFontAtlasBuildPreloadAllGlyphRanges(ImFontAtlas* atlas); // Legacy
|
IMGUI_API void ImFontAtlasBuildLegacyPreloadAllGlyphRanges(ImFontAtlas* atlas); // Legacy
|
||||||
IMGUI_API void ImFontAtlasBuildGetOversampleFactors(ImFontConfig* src, ImFontBaked* baked, int* out_oversample_h, int* out_oversample_v);
|
IMGUI_API void ImFontAtlasBuildGetOversampleFactors(ImFontConfig* src, ImFontBaked* baked, int* out_oversample_h, int* out_oversample_v);
|
||||||
IMGUI_API void ImFontAtlasBuildDiscardBakes(ImFontAtlas* atlas, int unused_frames);
|
IMGUI_API void ImFontAtlasBuildDiscardBakes(ImFontAtlas* atlas, int unused_frames);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user