mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
correctly select the next larger bitmap size
This commit is contained in:
parent
d5d23835e2
commit
08fa252c96
1 changed files with 2 additions and 1 deletions
|
|
@ -451,6 +451,7 @@ static bool ImGui_ImplFreeType_FontBakedInit(ImFontAtlas* atlas, ImFontConfig* s
|
|||
if (ImFabs(cur_height - size) < 0.001f)
|
||||
{
|
||||
best_index = i;
|
||||
best_height = cur_height;
|
||||
break;
|
||||
}
|
||||
else if (cur_height < size)
|
||||
|
|
@ -463,7 +464,7 @@ static bool ImGui_ImplFreeType_FontBakedInit(ImFontAtlas* atlas, ImFontConfig* s
|
|||
}
|
||||
else
|
||||
{
|
||||
if (best_height > cur_height)
|
||||
if (best_height < size && best_height < cur_height)
|
||||
{
|
||||
best_index = i;
|
||||
best_height = cur_height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue