diff options
Diffstat (limited to 'Map/Presentation/Theme/Font+theme.swift')
| -rw-r--r-- | Map/Presentation/Theme/Font+theme.swift | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Map/Presentation/Theme/Font+theme.swift b/Map/Presentation/Theme/Font+theme.swift index 079c0de..4660e48 100644 --- a/Map/Presentation/Theme/Font+theme.swift +++ b/Map/Presentation/Theme/Font+theme.swift @@ -48,27 +48,32 @@ extension Font { struct Map { static var note: Font { if UserDefaults.standard.bool(forKey: "useCustomFont"), - let customFontName = UserDefaults.standard.string(forKey: "customFontName"), - !customFontName.isEmpty { + let customFontName = UserDefaults.standard.string(forKey: "customFontName"), + !customFontName.isEmpty + { return Font.custom(customFontName, size: Dimensions.FontSize.Map.note).weight(.regular) } return Font.libertinus(size: Dimensions.FontSize.Map.note).weight(.regular) } - + static var axisLabel: Font { if UserDefaults.standard.bool(forKey: "useCustomFont"), - let customFontName = UserDefaults.standard.string(forKey: "customFontName"), - !customFontName.isEmpty { - return Font.custom(customFontName, size: Dimensions.FontSize.Map.axisLabel).weight(.regular) + let customFontName = UserDefaults.standard.string(forKey: "customFontName"), + !customFontName.isEmpty + { + return Font.custom(customFontName, size: Dimensions.FontSize.Map.axisLabel).weight( + .regular) } return Font.libertinus(size: Dimensions.FontSize.Map.axisLabel).weight(.regular) } - + static var vertexLabel: Font { if UserDefaults.standard.bool(forKey: "useCustomFont"), - let customFontName = UserDefaults.standard.string(forKey: "customFontName"), - !customFontName.isEmpty { - return Font.custom(customFontName, size: Dimensions.FontSize.Map.vertexLabel).weight(.regular) + let customFontName = UserDefaults.standard.string(forKey: "customFontName"), + !customFontName.isEmpty + { + return Font.custom(customFontName, size: Dimensions.FontSize.Map.vertexLabel).weight( + .regular) } return Font.libertinus(size: Dimensions.FontSize.Map.vertexLabel).weight(.regular) } |