aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/Preferences/MapPreferencesView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Map/Presentation/Preferences/MapPreferencesView.swift')
-rw-r--r--Map/Presentation/Preferences/MapPreferencesView.swift14
1 files changed, 14 insertions, 0 deletions
diff --git a/Map/Presentation/Preferences/MapPreferencesView.swift b/Map/Presentation/Preferences/MapPreferencesView.swift
index f8c976e..c5a9236 100644
--- a/Map/Presentation/Preferences/MapPreferencesView.swift
+++ b/Map/Presentation/Preferences/MapPreferencesView.swift
@@ -18,6 +18,8 @@ import SwiftUI
struct MapPreferencesView: View {
@AppStorage("showMapBackground") private var showBackground = true
@AppStorage("useSmartEditor") private var useSmartEditor = false
+ @AppStorage("useCustomFont") private var useCustomFont = false
+ @AppStorage("customFontName") private var customFontName = "Helvetica"
var body: some View {
VStack(alignment: .center, spacing: Dimensions.Spacing.loose) {
@@ -30,6 +32,18 @@ struct MapPreferencesView: View {
Toggle(isOn: $showBackground, label: { Text("preferences.map.map_style.show_background")
.font(.Theme.Body.regular)
})
+
+ Toggle(isOn: $useCustomFont, label: { Text("preferences.map.map_style.use_custom_font")
+ .font(.Theme.Body.regular)
+ })
+
+ Picker("", selection: $customFontName) {
+ ForEach(NSFontManager.shared.availableFontFamilies, id: \.self) { fontFamily in
+ Text(fontFamily).tag(fontFamily)
+ }
+ }
+ .pickerStyle(MenuPickerStyle())
+ .disabled(!useCustomFont)
}
.frame(maxWidth: .infinity, alignment: .leading)
}