summaryrefslogtreecommitdiff
path: root/imgui/imgui_spectrum.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2024-03-08 21:32:36 +0100
committerAldrik Ramaekers <aldrikboy@gmail.com>2024-03-08 21:32:36 +0100
commitdc5396903791c1b2a1808e724d9b6cf07d7604a7 (patch)
tree5d722fd6e0d3196473aa5f97864645ccdc13b37c /imgui/imgui_spectrum.cpp
parent0b429e06b8c4b66a9f7fe89b5504315ab4f69616 (diff)
config dir on linux, fix font issue
Diffstat (limited to 'imgui/imgui_spectrum.cpp')
-rw-r--r--imgui/imgui_spectrum.cpp24
1 files changed, 8 insertions, 16 deletions
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<ImWchar> 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() {