Skip to content

Fix for ImGui v1.92 #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix for ImGui v1.92 #40

wants to merge 1 commit into from

Conversation

pthom
Copy link

@pthom pthom commented Mar 23, 2025

Hi,

This PR adds two fixes:

  1. the icon size shall vary depending on FontGlobalScale (this enables a better rendering on high DPI platforms)
  2. Fix for an incoming API change in v1.92, cf Request for feedback: dynamic fonts & texture updates (v1.92) ocornut/imgui#8465

thanks!

@pthom pthom changed the title Fix im guiv1.92 Fix for ImGui v1.92 Mar 23, 2025
@pthom
Copy link
Author

pthom commented Mar 24, 2025

Note: ImGui::GetFontSize() is available since 2020, so this code should work with v1.92 and previous versions

@ocornut
Copy link
Contributor

ocornut commented Mar 31, 2025

GetFontSize() should already factor io.FontGlobalScale.

@pthom
Copy link
Author

pthom commented Apr 1, 2025

GetFontSize() should already factor io.FontGlobalScale.

Thanks, I took this into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants