swift-win32
swift-win32 copied to clipboard
Handle text scaling for HiDPI environments/DPI changes
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
.