From dc5396903791c1b2a1808e724d9b6cf07d7604a7 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Fri, 8 Mar 2024 21:32:36 +0100 Subject: config dir on linux, fix font issue --- imgui/imgui_spectrum.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'imgui/imgui_spectrum.cpp') diff --git a/imgui/imgui_spectrum.cpp b/imgui/imgui_spectrum.cpp index 4a1f02a..92667e0 100644 --- a/imgui/imgui_spectrum.cpp +++ b/imgui/imgui_spectrum.cpp @@ -11,22 +11,14 @@ namespace ImGui { ImFontConfig config; config.MergeMode = true; - { - ImFontGlyphRangesBuilder builder; - ImVector ranges; - builder.AddRanges(io.Fonts->GetGlyphRangesDefault()); - builder.AddRanges(io.Fonts->GetGlyphRangesGreek()); - builder.BuildRanges(&ranges); + ImFont* font = io.Fonts->AddFontFromMemoryCompressedTTF( + SourceSansProRegular_compressed_data, + SourceSansProRegular_compressed_size, + size, nullptr, nullptr); - ImFont* font = io.Fonts->AddFontFromMemoryCompressedTTF( - SourceSansProRegular_compressed_data, - SourceSansProRegular_compressed_size, - size, nullptr, ranges.Data); - - IM_ASSERT(font != nullptr); - io.FontDefault = font; - - } + IM_ASSERT(font != nullptr); + io.FontDefault = font; + io.Fonts->Build(); // Uncomment if you want these glyphs. Fonts can be found in fonts/ folder. // io.Fonts->AddFontFromMemoryCompressedTTF( @@ -40,7 +32,7 @@ namespace ImGui { // size, &config, io.Fonts->GetGlyphRangesJapanese()); - io.Fonts->Build(); + } void StyleColorsSpectrum() { -- cgit v1.2.3-70-g09d2