diff --git a/src/cata_imgui.cpp b/src/cata_imgui.cpp index d5c45dac48187..d4e18ec1d2b25 100644 --- a/src/cata_imgui.cpp +++ b/src/cata_imgui.cpp @@ -280,6 +280,8 @@ void cataimgui::client::load_fonts( const Font_Ptr &cata_font, io.Fonts->Fonts[0]->SetFallbackStrSizeCallback( GetFallbackStrWidth ); io.Fonts->Fonts[0]->SetFallbackCharSizeCallback( GetFallbackCharWidth ); io.Fonts->Fonts[0]->SetRenderFallbackCharCallback( CanRenderFallbackChar ); + io.Fonts->Build(); + ImGui::SetCurrentFont( ImGui::GetDefaultFont() ); ImGui_ImplSDLRenderer2_SetFallbackGlyphDrawCallback( [&]( const ImFontGlyphToDraw & glyph ) { std::string uni_string = std::string( glyph.uni_str ); point p( int( glyph.pos.x ), int( glyph.pos.y - 3 ) ); diff --git a/src/main.cpp b/src/main.cpp index c48f56482e84d..bbbf8c7ad7de2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -851,6 +851,8 @@ int main( int argc, const char *argv[] ) #if defined(LOCALIZE) if( get_option( "USE_LANG" ).empty() && !SystemLocale::Language().has_value() ) { + imclient->new_frame(); // we have to prime the pump, because of reasons + imclient->end_frame(); const std::string lang = select_language(); get_options().get_option( "USE_LANG" ).setValue( lang ); set_language_from_options();