diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-07 13:46:01 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-07 13:46:01 +0200 |
| commit | a1a485f16e0f1720f2dcdf7ab03d52c29fe9e252 (patch) | |
| tree | f856e787f18bcb8abcf15a8aa72793cf56630fd2 /Map/Presentation/Theme/Font+theme.swift | |
| parent | 69f8f7e81ca73ffbf1a0d76ccbd6cf8545caff57 (diff) | |
Show custom fonts
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) } |