From eb9bd913e2499ba2157c3c060f0bf73c10535435 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 3 Aug 2023 05:34:49 -0500 Subject: [PATCH] and one more fix --- src/gui/settings.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 5faa3f2be..7f582f6c8 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -4068,7 +4068,7 @@ void FurnaceGUI::applyUISettings(bool updateFonts) { if ((headFont=ImGui::GetIO().Fonts->AddFontFromFileTTF(settings.headFontPath.c_str(),MAX(1,e->getConfInt("headFontSize",27)*dpiScale),NULL,upTo800))==NULL) { logW("could not load header font! reverting to default font"); settings.headFont=0; - if ((headFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(builtinFontM[settings.headFont],builtinFontMLen[settings.headFont],MAX(1,e->getConfInt("headFontSize",27)*dpiScale),NULL,upTo800))==NULL) { + if ((headFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(builtinFont[settings.headFont],builtinFontLen[settings.headFont],MAX(1,e->getConfInt("headFontSize",27)*dpiScale),NULL,upTo800))==NULL) { logE("could not load header font! falling back to IBM Plex Sans."); headFont=ImGui::GetIO().Fonts->AddFontDefault(); } @@ -4079,7 +4079,7 @@ void FurnaceGUI::applyUISettings(bool updateFonts) { if ((headFont=ImGui::GetIO().Fonts->AddFontFromFileTTF(SYSTEM_HEAD_FONT_PATH_3,MAX(1,e->getConfInt("headFontSize",27)*dpiScale),NULL,upTo800))==NULL) { logW("could not load header font! reverting to default font"); settings.headFont=0; - if ((headFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(builtinFontM[settings.headFont],builtinFontMLen[settings.headFont],MAX(1,e->getConfInt("headFontSize",27)*dpiScale),NULL,upTo800))==NULL) { + if ((headFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(builtinFont[settings.headFont],builtinFontLen[settings.headFont],MAX(1,e->getConfInt("headFontSize",27)*dpiScale),NULL,upTo800))==NULL) { logE("could not load header font! falling back to IBM Plex Sans."); headFont=ImGui::GetIO().Fonts->AddFontDefault(); } @@ -4087,7 +4087,7 @@ void FurnaceGUI::applyUISettings(bool updateFonts) { } } } else { - if ((headFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(builtinFontM[settings.headFont],builtinFontMLen[settings.headFont],MAX(1,e->getConfInt("headFontSize",27)*dpiScale),NULL,upTo800))==NULL) { + if ((headFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(builtinFont[settings.headFont],builtinFontLen[settings.headFont],MAX(1,e->getConfInt("headFontSize",27)*dpiScale),NULL,upTo800))==NULL) { logE("could not load header font!"); headFont=ImGui::GetIO().Fonts->AddFontDefault(); }