swift-win32 icon indicating copy to clipboard operation
swift-win32 copied to clipboard

Handle text scaling for HiDPI environments/DPI changes

Open compnerd opened this issue 3 years ago • 0 comments

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.

compnerd avatar Oct 14 '20 01:10 compnerd