From a121f51e8e343fa96261d82d32e1194f9c8c1af9 Mon Sep 17 00:00:00 2001 From: Katie M Date: Thu, 9 May 2024 22:19:26 -0400 Subject: [PATCH] Fixing an issue where CJK/russian fonts draw just a little too high on ImGui --- src/cata_imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cata_imgui.cpp b/src/cata_imgui.cpp index 7db097919f9c2..0fcf50c09aaee 100644 --- a/src/cata_imgui.cpp +++ b/src/cata_imgui.cpp @@ -238,7 +238,7 @@ void cataimgui::client::load_fonts( const std::unique_ptr &cata_font, io.Fonts->Fonts[0] = cfg.DstFont; 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 - 5 ) ); + point p( int( glyph.pos.x ), int( glyph.pos.y - 3 ) ); unsigned char col = 0; auto it = activeFont->sdlColorsToCata.find( glyph.col & 0xFFFFFF ); if( it != activeFont->sdlColorsToCata.end() ) {