Skip to content

DPI awareness font scaling#85

Merged
hyv1001 merged 2 commits intoBoomingTech:mainfrom
iaomw:main
Apr 9, 2022
Merged

DPI awareness font scaling#85
hyv1001 merged 2 commits intoBoomingTech:mainfrom
iaomw:main

Conversation

@iaomw
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

iaomw commented Apr 8, 2022

May also work for this DPI issue #4

@hyv1001
Copy link
Copy Markdown
Collaborator

hyv1001 commented Apr 9, 2022

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

@hyv1001
Copy link
Copy Markdown
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
Copy Markdown
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