From 2f28628bbecfc4dd697f8ba583649edc27271e43 Mon Sep 17 00:00:00 2001 From: blankie Date: Sun, 8 Jan 2023 19:06:18 +0700 Subject: [PATCH] Set only LC_TIME --- main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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