Skip to content

Commit

Permalink
fix: 🐛 Explicitly set Font.fiori() to use system font when registerFo…
Browse files Browse the repository at this point in the history
…nt() is not called
  • Loading branch information
billzhou0223 committed Mar 17, 2022
1 parent 6c3a068 commit ae3d173
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/FioriThemeManager/72-Fonts/Font+Fiori.swift
Expand Up @@ -10,6 +10,10 @@ public extension Font {
/// - Parameter fioriTextStyle: Text style.
/// - Returns: A scaled font for this text style.
static func fiori(forTextStyle fioriTextStyle: Font.FioriTextStyle) -> Font {
guard UIFont.familyNames.contains("72") else {
return .system(fioriTextStyle.textStyle)
}

if #available(iOS 14.0, *) {
return .custom("72", size: fioriTextStyle.size, relativeTo: fioriTextStyle.textStyle)
} else {
Expand Down

0 comments on commit ae3d173

Please sign in to comment.