Make font atlas packing padding configurable

This commit is contained in:
James Wallis
2017-08-15 14:11:04 +01:00
committed by GitHub
parent 01b99bbe09
commit 718f00d651
2 changed files with 4 additions and 2 deletions

View File

@ -1382,6 +1382,7 @@ struct ImFontAtlas
int TexWidth; // Texture width calculated during Build().
int TexHeight; // Texture height calculated during Build().
int TexDesiredWidth; // Texture width desired by user before 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.
int TexGlyphPadding; // Padding between glyphs within texture in pixels. Defaults to 1.
ImVec2 TexUvWhitePixel; // Texture coordinates to a white pixel
ImVector<ImFont*> Fonts; // Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font.