Skip to content

Commit a00ad21

Browse files
committed
update to higher-resolution font in UI
1 parent 0eceb0f commit a00ad21

File tree

6 files changed

+833
-22
lines changed

6 files changed

+833
-22
lines changed

tsd/apps/interactive/common/BaseApplication.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "BaseApplication.h"
55
// tsd
6+
#include "tsd_font.h"
67
#include "tsd_ui.h"
78
// anari_viewer
89
#include "anari_viewer/ui_anari.h"
@@ -26,8 +27,12 @@ anari_viewer::WindowArray BaseApplication::setupWindows()
2627
anari_viewer::ui::init();
2728

2829
ImGuiIO &io = ImGui::GetIO();
29-
io.FontGlobalScale = 1.5f;
30+
io.FontGlobalScale = 1.f;
3031
io.IniFilename = nullptr;
32+
auto *font = io.Fonts->AddFontFromMemoryCompressedTTF(
33+
tsd_font_compressed_data, tsd_font_compressed_size, 20.f);
34+
io.Fonts->ConfigData[1].FontDataOwnedByAtlas = false;
35+
io.FontDefault = font;
3136

3237
if (appCore()->commandLine.useDefaultLayout)
3338
ImGui::LoadIniSettingsFromMemory(getDefaultLayout());

0 commit comments

Comments
 (0)