Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
How to handle HiDPI?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
Hey!
I've saw some open topics in vurtun's github like:
https://github.com/vurtun/nuklear/issues/123
https://github.com/vurtun/nuklear/issues/74#issuecomment-212143475
And in the each topic I didn't really found an answer - how to handle it with "small blood" without integrating more libraries and recalculate everything by hand.
To describe a problem, I have 4k monitor 3840 x 2160 with 200% scaling.
SDL2 as platform handler.
Looks like Windows 10 simply scale my app x2 (I'm creating 1024x728, should be really small window without DPI scaling) (same for MacOS), which feels okay, but looks like it kinda *simple scale* and that's why all the fonts and svg icons looks awful.
Example:
(On the left my app, on the right Visual Studio, look at the font and svg icon aliasing)

My current only option is to disable DPI support for whole app (through make flags), and apply 2x to everything, which looks like a crutch
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the SDL2 platform behavior and the build flags used to disable DPI support on Windows 10 and macOS. The issue does not name files or tests, so first identify where platform scaling and rendering are handled. Done means a concrete Nuklear-level answer for HiDPI fonts and SVG icons without manually recalculating everything.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100