rust-windowing / rust-windowing/winit
Add methods for retrieving exact DPI
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Right now, we have the hidpi_factor method, which lets you obtain a scaling factor for the entire application. However, we don't have methods for retrieving the OS-reported DPI. That value is useful in several contexts (such as font rendering) and afaik can be calculated differently on different operating systems.
Should we expose that value? On Windows, at least, we're already doing most of the work to retrieve it in the hidpi_factor calculations, so exposing this would be a fairly simple extension of that. I'm not entirely sure what the situation is on other platforms, though.
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 with the existing hidpi_factor entry point and trace its Windows DPI retrieval path, then investigate how the other supported platforms report DPI. Done means a decided cross-platform API for exact OS-reported DPI, with behavior verified for the supported platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100