Skip to content

Commit

Permalink
set global scale from the settings at startup (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy authored Dec 4, 2024
1 parent 7125647 commit 9354165
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ void ImGuiGUIEngine::initBackend(GLFWwindow* glfwWindow)
static const ImWchar icon_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
io.Fonts->AddFontFromMemoryCompressedTTF(FA_REGULAR_400_compressed_data, FA_REGULAR_400_compressed_size, 16 * yscale, &config, icon_ranges);
io.Fonts->AddFontFromMemoryCompressedTTF(FA_SOLID_900_compressed_data, FA_SOLID_900_compressed_size, 16 * yscale, &config, icon_ranges);

// restore the global scale stored in the Settings ini file
const float globalScale = static_cast<float>(ini.GetDoubleValue("Visualization", "globalScale", 1.0));
io.FontGlobalScale = globalScale;
}
}

Expand Down

0 comments on commit 9354165

Please sign in to comment.