impr: Improve font loading speed

This commit is contained in:
WerWolv
2023-11-29 09:50:57 +01:00
parent 80984f28ec
commit 540e8458a5
2 changed files with 26 additions and 10 deletions

View File

@@ -25,15 +25,13 @@ namespace hex::plugin::builtin {
{
{ glyph(ICON_FA_BACKSPACE), glyph(ICON_FA_INFINITY), glyph(ICON_FA_TACHOMETER_ALT), glyph(ICON_FA_MICROCHIP), glyph(ICON_FA_CODE_BRANCH) }
},
{ 0, 0 },
ImGuiFreeTypeBuilderFlags_Monochrome | ImGuiFreeTypeBuilderFlags_MonoHinting);
{ 0, 0 });
ImHexApi::Fonts::loadFont("VS Codicons", romfs::get("fonts/codicons.ttf").span<u8>(),
{
{ ICON_MIN_VS, ICON_MAX_VS }
},
{ 0, 0 },
ImGuiFreeTypeBuilderFlags_Monochrome | ImGuiFreeTypeBuilderFlags_MonoHinting);
{ 0, 0 });
ImHexApi::Fonts::loadFont("Unifont", romfs::get("fonts/unifont.otf").span<u8>());
}