|
|
|
|
@ -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;
|
|
|
|
|
|
|
|
|
|
|