From c91da2189c4f0d67bb5a266e0698f9822851a814 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 4 Oct 2024 11:59:05 -0500 Subject: [PATCH] updated the UIFont to TextStyle conversion Signed-off-by: Matt Bruce --- VDS/Typography/Typogprahy+Styles.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Typography/Typogprahy+Styles.swift b/VDS/Typography/Typogprahy+Styles.swift index 256094c5..d1843232 100644 --- a/VDS/Typography/Typogprahy+Styles.swift +++ b/VDS/Typography/Typogprahy+Styles.swift @@ -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 }