Skip to content

Conversation

@alxbilger
Copy link
Contributor

This PR fixes incorrect ImGui font scaling on high-DPI monitors (e.g. 4K), where text appeared significantly smaller than intended.

Previously, the code applied DPI scaling twice in opposite directions:

  • Font sizes were multiplied by the monitor content scale (yscale)
  • ImGuiIO::FontGlobalScale was then divided by the same DPI factor

This effectively canceled the DPI scaling, causing text to render at near-non-DPI-aware sizes on high-resolution displays.

I also reload the font when changing the content scale (for example when moving between two monitors with different content change).

To be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant