From 8c5dc57359fddd0823bedc7b8cc12cee56155067 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 24 Sep 2022 00:29:21 +0200 Subject: [PATCH] Add ellipsis to fixed font atlas. --- profiler/src/Fonts.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/profiler/src/Fonts.cpp b/profiler/src/Fonts.cpp index bda6643d..765e4dbe 100644 --- a/profiler/src/Fonts.cpp +++ b/profiler/src/Fonts.cpp @@ -28,6 +28,11 @@ void LoadFonts( float scale, ImFont*& cb_fixedWidth, ImFont*& cb_bigFont, ImFont ICON_MIN_FA, ICON_MAX_FA, 0 }; + static const ImWchar rangesFixed[] = { + 0x0020, 0x00FF, // Basic Latin + Latin Supplement + 0x2026, 0x2026, // ellipsis + 0 + }; ImGuiIO& io = ImGui::GetIO(); @@ -43,7 +48,7 @@ void LoadFonts( float scale, ImFont*& cb_fixedWidth, ImFont*& cb_bigFont, ImFont io.Fonts->Clear(); io.Fonts->AddFontFromMemoryCompressedTTF( tracy::DroidSans_compressed_data, tracy::DroidSans_compressed_size, round( 15.0f * scale ), &configBasic, rangesBasic ); io.Fonts->AddFontFromMemoryCompressedTTF( tracy::FontAwesomeSolid_compressed_data, tracy::FontAwesomeSolid_compressed_size, round( 14.0f * scale ), &configMerge, rangesIcons ); - s_fixedWidth = cb_fixedWidth = io.Fonts->AddFontFromMemoryCompressedTTF( tracy::FiraCodeRetina_compressed_data, tracy::FiraCodeRetina_compressed_size, round( 15.0f * scale ), &configFixed ); + s_fixedWidth = cb_fixedWidth = io.Fonts->AddFontFromMemoryCompressedTTF( tracy::FiraCodeRetina_compressed_data, tracy::FiraCodeRetina_compressed_size, round( 15.0f * scale ), &configFixed, rangesFixed ); s_bigFont = cb_bigFont = io.Fonts->AddFontFromMemoryCompressedTTF( tracy::DroidSans_compressed_data, tracy::DroidSans_compressed_size, round( 21.0f * scale ), &configBasic ); io.Fonts->AddFontFromMemoryCompressedTTF( tracy::FontAwesomeSolid_compressed_data, tracy::FontAwesomeSolid_compressed_size, round( 20.0f * scale ), &configMerge, rangesIcons ); s_smallFont = cb_smallFont = io.Fonts->AddFontFromMemoryCompressedTTF( tracy::DroidSans_compressed_data, tracy::DroidSans_compressed_size, round( 10.0f * scale ), &configBasic );