Fonts: Basic heuristic to repack instead of growing. Moved rects count/surface to internals.

This commit is contained in:
ocornut
2025-06-11 15:45:07 +02:00
parent 2137b3448b
commit 8ed4e2dde7
4 changed files with 27 additions and 15 deletions
-2
View File
@@ -3626,8 +3626,6 @@ struct ImFontAtlas
void* FontLoaderData; // Font backend opaque storage
unsigned int FontBuilderFlags; // [FIXME: Should be called FontLoaderFlags] Shared flags (for all fonts) for font loader. THIS IS BUILD IMPLEMENTATION DEPENDENT (e.g. . Per-font override is also available in ImFontConfig.
int RefCount; // Number of contexts using this atlas
int _PackedSurface; // Number of packed pixels. Used when compacting to heuristically find the ideal texture size.
int _PackedRects; // Number of packed rectangles.
// [Obsolete]
//int TexDesiredWidth; // OBSOLETED in 1.91.5 (force texture width before calling Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height)