aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/Theme/Font+theme.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-07-07 13:46:01 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-07-07 13:46:01 +0200
commita1a485f16e0f1720f2dcdf7ab03d52c29fe9e252 (patch)
treef856e787f18bcb8abcf15a8aa72793cf56630fd2 /Map/Presentation/Theme/Font+theme.swift
parent69f8f7e81ca73ffbf1a0d76ccbd6cf8545caff57 (diff)
Show custom fonts
Diffstat (limited to 'Map/Presentation/Theme/Font+theme.swift')
-rw-r--r--Map/Presentation/Theme/Font+theme.swift25
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)
}