compnerd / compnerd/swift-win32

Handle text scaling for HiDPI environments/DPI changes

Open
#204 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Swift
Stars
1.2k
Forks
76
PR merge metrics
No merged PRs in 30d

Description

Although views currently scale according to the DPI settings for the monitor, the text currently does not. The `TraitCollection` type has the necessary information which needs to be wired through to `FontMetrics`, `FontDescriptor`, and `Font`. The `Window` type conforms to `TraitEnvironment` and will send the `traitCollectionDidChange(_:)` which allows the responder chain to react and re-size fonts on views conforming to `ContentSizeCategoryAdjusting`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing TraitCollection through FontMetrics, FontDescriptor, and Font, then inspect Window's TraitEnvironment and traitCollectionDidChange(_:) flow. Done means text scales with monitor DPI settings and responds by resizing fonts on views conforming to ContentSizeCategoryAdjusting.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.