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:
commit
9f2da6f072
@ -76,7 +76,7 @@ extension TextStyle {
|
|||||||
|
|
||||||
public static func convert(font: UIFont) -> TextStyle {
|
public static func convert(font: UIFont) -> TextStyle {
|
||||||
guard let found = allCases.first(where: { font.fontName == $0.fontFace.fontName && font.pointSize == $0.pointSize} ) else {
|
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
|
return found
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user