mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-28 14:20:30 +00:00
ImGuiManager: Move font awesome to last priority
Too many glyph conflicts. Fixes coloured icons.
This commit is contained in:
parent
3b90d18c6a
commit
9127198be7
@ -870,14 +870,6 @@ bool ImGuiManager::CreateFontAtlas(Error* error)
|
||||
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.
|
||||
icon_cfg.FontLoaderFlags = ImGuiFreeTypeLoaderFlags_LoadColor | ImGuiFreeTypeLoaderFlags_Bitmap;
|
||||
|
||||
@ -889,6 +881,14 @@ bool ImGuiManager::CreateFontAtlas(Error* error)
|
||||
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.
|
||||
text_cfg.MergeMode = true;
|
||||
for (size_t i = 1; i < s_state.text_font_order.size(); i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user