Merge branch 'bugfix/UIFont-Converter' into 'develop'

updated the UIFont to TextStyle conversion

See merge request BPHV_MIPS/vds_ios!307
This commit is contained in:
Bruce, Matt R 2024-10-04 17:00:05 +00:00
commit 9f2da6f072

View File

@ -76,7 +76,7 @@ extension TextStyle {
public static func convert(font: UIFont) -> TextStyle {
guard let found = allCases.first(where: { font.fontName == $0.fontFace.fontName && font.pointSize == $0.pointSize} ) else {
return TextStyle(rawValue: "Custom\(font.fontName)", fontFace: .custom(font), pointSize: font.pointSize)
return TextStyle(rawValue: "Custom\(font.fontName)", fontFace: .custom(font), pointSize: font.pointSize, lineHeight: min(font.lineHeight, font.pointSize))
}
return found
}