mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-28 14:20:30 +00:00
ImGuiManager: Load PF before FA
Works around code point conflicts, for now. Probably should just reallocate PF in the future though.
This commit is contained in:
parent
6c6cc910e6
commit
ff0add2ed0
@ -862,14 +862,6 @@ bool ImGuiManager::CreateFontAtlas(Error* error)
|
||||
icon_cfg.GlyphMinAdvanceX = default_text_size;
|
||||
icon_cfg.GlyphMaxAdvanceX = default_text_size;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if (!ImGui::GetIO().Fonts->AddFontFromMemoryTTF(s_state.icon_pf_font_data.data(),
|
||||
static_cast<int>(s_state.icon_pf_font_data.size()),
|
||||
default_text_size * 1.2f, 0.0f, &icon_cfg)) [[unlikely]]
|
||||
@ -878,6 +870,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;
|
||||
}
|
||||
|
||||
// Only for emoji font.
|
||||
icon_cfg.FontLoaderFlags = ImGuiFreeTypeLoaderFlags_LoadColor | ImGuiFreeTypeLoaderFlags_Bitmap;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user