Adds a new AdaptiveStyle enum case and adaptation implementation based on UIFontMetrics available in iOS 11+
Context
The existing AdaptiveStyle modes are all fantastic, but are in some part workarounds for UIKit's previous lack of support for adapting non-system fonts to the user's preferred content size category. This change adds a new AdaptiveStyle enum case and auto-scaling implementation compatible with the existing AdaptiveTextContainer system which adopts the UIFontMetrics API for scaling any font with the same size curve used by the built-in system text styles.
Guidance
Review from @ZevEisenberg or someone on the BonMot maintainers team. See inline notes for additional context.
Hey, @ndonald2! Thanks so much for the PR! I've been wanting to update BonMot's adaptive font support since it was updated in iOS, so I'm excited to look at this. I'll see what I can do on my hack day this week.
Purpose
Adds a new
AdaptiveStyle
enum case and adaptation implementation based onUIFontMetrics
available in iOS 11+Context
The existing
AdaptiveStyle
modes are all fantastic, but are in some part workarounds for UIKit's previous lack of support for adapting non-system fonts to the user's preferred content size category. This change adds a newAdaptiveStyle
enum case and auto-scaling implementation compatible with the existingAdaptiveTextContainer
system which adopts theUIFontMetrics
API for scaling any font with the same size curve used by the built-in system text styles.Guidance
Review from @ZevEisenberg or someone on the BonMot maintainers team. See inline notes for additional context.
Related to https://github.com/Rightpoint/BonMot/issues/293
PS - Hi @ZevEisenberg ! I hope things are well at Rightpoint. I've continued to be a big fan of BonMot since I parted ways with RZ.