Skip to content

Commit

Permalink
Rescale font only if in the macOS retina display environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe2933 committed Dec 21, 2024
1 parent a0d9196 commit 4a8c766
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions impl/MainApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ vk_gltf_viewer::MainApp::MainApp() {
ImGuiIO &io = ImGui::GetIO();
const glm::vec2 contentScale = window.getContentScale();
io.DisplayFramebufferScale = { contentScale.x, contentScale.y };
#if __APPLE__
io.FontGlobalScale = 1.f / io.DisplayFramebufferScale.x;
#endif
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;

ImVector<ImWchar> ranges;
Expand Down

0 comments on commit 4a8c766

Please sign in to comment.