ImGuiManager: Move font awesome to last priority

Too many glyph conflicts. Fixes coloured icons.
This commit is contained in:
Stenzek 2025-06-21 20:34:00 +10:00
parent 3b90d18c6a
commit 9127198be7
No known key found for this signature in database

View File

@ -870,14 +870,6 @@ bool ImGuiManager::CreateFontAtlas(Error* error)
return false; return false;
} }
if (!ImGui::GetIO().Fonts->AddFontFromMemoryTTF(s_state.icon_fa_font_data.data(),
static_cast<int>(s_state.icon_fa_font_data.size()),
default_text_size * 0.75f, 0.0f, &icon_cfg)) [[unlikely]]
{
Error::SetStringView(error, "Failed to add FA icon font");
return false;
}
// Only for emoji font. // Only for emoji font.
icon_cfg.FontLoaderFlags = ImGuiFreeTypeLoaderFlags_LoadColor | ImGuiFreeTypeLoaderFlags_Bitmap; icon_cfg.FontLoaderFlags = ImGuiFreeTypeLoaderFlags_LoadColor | ImGuiFreeTypeLoaderFlags_Bitmap;
@ -889,6 +881,14 @@ bool ImGuiManager::CreateFontAtlas(Error* error)
return false; return false;
} }
if (!ImGui::GetIO().Fonts->AddFontFromMemoryTTF(s_state.icon_fa_font_data.data(),
static_cast<int>(s_state.icon_fa_font_data.size()),
default_text_size * 0.75f, 0.0f, &icon_cfg)) [[unlikely]]
{
Error::SetStringView(error, "Failed to add FA icon font");
return false;
}
// Now we can add the remaining text fonts. // Now we can add the remaining text fonts.
text_cfg.MergeMode = true; text_cfg.MergeMode = true;
for (size_t i = 1; i < s_state.text_font_order.size(); i++) for (size_t i = 1; i < s_state.text_font_order.size(); i++)