mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
Comments, moved ImFontAtlas::Flags to "public" area.
This commit is contained in:
parent
fed0a884f7
commit
024e23c4d7
3 changed files with 5 additions and 3 deletions
|
|
@ -80,6 +80,7 @@ In this document:
|
|||
|
||||
- Mind the fact that some graphics drivers have texture size limitation.
|
||||
- Set io.Fonts.TexDesiredWidth to specify a texture width to minimize texture height (see comment in ImFontAtlas::Build function).
|
||||
- Set io.Fonts.Flags |= ImFontAtlasFlags_NoPowerOfTwoHeight; to disable rounding the texture height to the next power of two.
|
||||
- You may reduce oversampling, e.g. config.OversampleH = 2 or 1.
|
||||
- Reduce glyphs ranges, consider calculating them based on your source data if this is possible.
|
||||
|
||||
|
|
@ -111,7 +112,7 @@ In this document:
|
|||
Offset font vertically by altering the io.Font->DisplayOffset value:
|
||||
|
||||
ImFont* font = io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels);
|
||||
font->DisplayOffset.y += 1; // Render 1 pixel down
|
||||
font->DisplayOffset.y = 1; // Render 1 pixel down
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue