diff --git a/main.cpp b/main.cpp index 75c524f..20e409c 100644 --- a/main.cpp +++ b/main.cpp @@ -17,7 +17,7 @@ #include "event_loop.h" int main(int, char**) { - setlocale(LC_ALL, ""); + setlocale(LC_TIME, ""); Config config; try { @@ -110,14 +110,16 @@ int main(int, char**) { //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese()); //IM_ASSERT(font != NULL); - ImFont* monospace_font; + ImFont* monospace_font = nullptr; #ifdef USE_FONTCONFIG try { std::pair fonts = get_fonts(); - io.Fonts->AddFontFromFileTTF(fonts.first.c_str(), 15.0f); + io.Fonts->AddFontFromFileTTF(fonts.first.c_str(), 16.0f); monospace_font = io.Fonts->AddFontFromFileTTF(fonts.second.c_str(), 15.0f); } catch (const std::exception& e) { log("Failed to get fonts", e); + } + if (!monospace_font) { monospace_font = io.Fonts->AddFontDefault(); } #else