Skip to content
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

DPI awareness font scaling #85

Merged
merged 2 commits into from
Apr 9, 2022
Merged

DPI awareness font scaling #85

merged 2 commits into from
Apr 9, 2022

Conversation

iaomw
Copy link
Contributor

@iaomw iaomw commented Apr 8, 2022

Here is a quick fix to load font using DPI scaling. And it's reactive to DPI changes while the engine is running.

A brief introduction on the issue fixed #84

@iaomw
Copy link
Contributor Author

iaomw commented Apr 8, 2022

May also work for this DPI issue #4

@hyv1001
Copy link
Collaborator

hyv1001 commented Apr 9, 2022

Seems that it doesn't work on my 4k monitor.
image

@hyv1001
Copy link
Collaborator

hyv1001 commented Apr 9, 2022

Seems that it doesn't work on my 4k monitor. image
However, It does solve the problem of blur

@iaomw
Copy link
Contributor Author

iaomw commented Apr 9, 2022

100%
150%
200%

It seems ImGui behaves differently on Windows and macOS. Windows doesn't need the scaling workaround on macOS, simply loading font with DPI scaling is good enough. It will be interesting to see how it work on different Linux distros, but I don't use Linux. Any Linux fan want to test this feature?

@hyv1001 hyv1001 merged commit e5d43bc into BoomingTech:main Apr 9, 2022
@hyv1001 hyv1001 mentioned this pull request Apr 9, 2022
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.

Pixel perfect GUI text, DPI awareness font scaling
2 participants