updated the UIFont to TextStyle conversion
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
2febe4595c
commit
c91da2189c
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user