WordPress-iOS-Shared
WordPress-iOS-Shared copied to clipboard
fontForTextStyle(_ style: maximumPointSize:) doesn't use maximumPointSize parameter in the implementation
fontForTextStyle(_ style: maximumPointSize:) doesn't use maximumPointSize parameter in the implementation. This method is used in some parts of the WordPress-iOS application and is features in the accessibility guide.
It was removed in the https://github.com/wordpress-mobile/WordPress-iOS-Shared/pull/294 PR.
@objc public class func fontForTextStyle(_ style: UIFont.TextStyle, maximumPointSize: CGFloat = maxFontSize) -> UIFont {
let fontDescriptor = UIFontDescriptor.preferredFontDescriptor(withTextStyle: style)
return UIFont(descriptor: fontDescriptor, size: fontDescriptor.pointSize)
}
a) If we don't want to support maximumPointSize anymore, remove it from method signature.
b) If we want to support maximumPointSize change implementation to use fontDescriptor method that uses maximumPointSize.