diff --git a/IceCubesApp/App/Tabs/Settings/DisplaySettingsView.swift b/IceCubesApp/App/Tabs/Settings/DisplaySettingsView.swift index cf091191..33f7fe1a 100644 --- a/IceCubesApp/App/Tabs/Settings/DisplaySettingsView.swift +++ b/IceCubesApp/App/Tabs/Settings/DisplaySettingsView.swift @@ -42,7 +42,7 @@ struct DisplaySettingsView: View { } .listRowBackground(theme.primaryBackgroundColor) - Section("settings.display.section.display") { + Section("settings.display.section.font") { Picker("settings.display.font", selection: .init(get: { () -> FontState in if userPreferences.chosenFont?.fontName == "OpenDyslexic-Regular" { return FontState.openDyslexic @@ -67,6 +67,22 @@ struct DisplaySettingsView: View { } } .navigationDestination(isPresented: $isFontSelectorPresented, destination: { FontPicker() }) + + Toggle("settings.display.font.rounded", isOn: $userPreferences.useSFRoundedFont) + .disabled(userPreferences.chosenFont != nil) + + VStack { + Slider(value: $userPreferences.fontSizeScale, in: 0.5 ... 1.5, step: 0.1) + Text("settings.display.font.scaling-\(String(format: "%.1f", userPreferences.fontSizeScale))") + .font(.scaledBody) + } + .alignmentGuide(.listRowSeparatorLeading) { d in + d[.leading] + } + } + .listRowBackground(theme.primaryBackgroundColor) + + Section("settings.display.section.display") { Picker("settings.display.avatar.position", selection: $theme.avatarPosition) { ForEach(Theme.AvatarPosition.allCases, id: \.rawValue) { position in Text(position.description).tag(position) @@ -88,14 +104,6 @@ struct DisplaySettingsView: View { Text(buttonStyle.description).tag(buttonStyle) } } - VStack { - Slider(value: $userPreferences.fontSizeScale, in: 0.5 ... 1.5, step: 0.1) - Text("settings.display.font.scaling-\(String(format: "%.1f", userPreferences.fontSizeScale))") - .font(.scaledBody) - } - .alignmentGuide(.listRowSeparatorLeading) { d in - d[.leading] - } Toggle("settings.display.translate-button", isOn: $userPreferences.showTranslateButton) } .listRowBackground(theme.primaryBackgroundColor) diff --git a/IceCubesApp/Resources/Localization/ca.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/ca.lproj/Localizable.strings index 76c28b9c..a61eeb1c 100644 --- a/IceCubesApp/Resources/Localization/ca.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/ca.lproj/Localizable.strings @@ -184,6 +184,9 @@ "settings.swipeactions.status.use-theme-colors" = "Use theme colors instead of default colors"; "settings.swipeactions.status.icon-style" = "Icon style"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "Exploreu"; "tab.federated" = "Federat"; diff --git a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings index a6009323..45dd137a 100644 --- a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings @@ -182,6 +182,9 @@ "settings.swipeactions.status.use-theme-colors" = "Farbschema anstelle der Standardfarben verwenden"; "settings.swipeactions.status.icon-style" = "Symbolstil"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + "enum.expand-media.show" = "Alle zeigen"; "enum.expand-media.hide" = "Alle ausblenden"; "enum.expand-media.hide-sensitive" = "Sensible ausblenden"; diff --git a/IceCubesApp/Resources/Localization/en-GB.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/en-GB.lproj/Localizable.strings index e10b592f..62ca7b97 100644 --- a/IceCubesApp/Resources/Localization/en-GB.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/en-GB.lproj/Localizable.strings @@ -188,6 +188,9 @@ "settings.swipeactions.status.use-theme-colors" = "Use theme colors instead of default colors"; "settings.swipeactions.status.icon-style" = "Icon style"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "Explore"; "tab.federated" = "Federated"; diff --git a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings index f5e8188b..b0485f44 100644 --- a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings @@ -186,6 +186,9 @@ "settings.swipeactions.status.use-theme-colors" = "Use theme colors instead of default colors"; "settings.swipeactions.status.icon-style" = "Icon style"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "Explore"; "tab.federated" = "Federated"; diff --git a/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings index 1fc44574..41f4eb4c 100644 --- a/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings @@ -182,6 +182,9 @@ "settings.swipeactions.status.use-theme-colors" = "Usar colores del tema en lugar de los colores por defecto"; "settings.swipeactions.status.icon-style" = "Estilo de icono"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + "enum.expand-media.show" = "Siempre"; "enum.expand-media.hide" = "Nunca"; "enum.expand-media.hide-sensitive" = "Ocultar contenido sensible"; diff --git a/IceCubesApp/Resources/Localization/eu.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/eu.lproj/Localizable.strings index 4c8b76f3..11293277 100644 --- a/IceCubesApp/Resources/Localization/eu.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/eu.lproj/Localizable.strings @@ -182,6 +182,9 @@ "settings.swipeactions.status.use-theme-colors" = "Erabili hautatutako kolorea defektuzko koloreen ordez"; "settings.swipeactions.status.icon-style" = "Ikonoen itxura"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + "enum.expand-media.show" = "Erakutsi guztia"; "enum.expand-media.hide" = "Ezkutatu guztia"; "enum.expand-media.hide-sensitive" = "Ezkutatu hunkigarria"; diff --git a/IceCubesApp/Resources/Localization/fr.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/fr.lproj/Localizable.strings index 756afb0c..746c5307 100644 --- a/IceCubesApp/Resources/Localization/fr.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/fr.lproj/Localizable.strings @@ -185,6 +185,9 @@ "settings.swipeactions.status.use-theme-colors" = "Use theme colors instead of default colors"; "settings.swipeactions.status.icon-style" = "Icon style"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "Explorer"; "tab.federated" = "Fédéré"; diff --git a/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings index 4606eb86..69d954ec 100644 --- a/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings @@ -185,6 +185,9 @@ "settings.swipeactions.status.use-theme-colors" = "Usa i colori del tema al posto dei colori di default"; "settings.swipeactions.status.icon-style" = "Stile delle icone"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "Esplora"; "tab.federated" = "Federazione"; diff --git a/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings index b300341d..fdc7e436 100644 --- a/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings @@ -185,6 +185,9 @@ "settings.swipeactions.status.use-theme-colors" = "デフォルトの色の代わりにテーマの色を使用する"; "settings.swipeactions.status.icon-style" = "アイコンスタイル"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "エクスプローラー"; "tab.federated" = "連合"; diff --git a/IceCubesApp/Resources/Localization/ko.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/ko.lproj/Localizable.strings index 3eb16605..7bad2f48 100644 --- a/IceCubesApp/Resources/Localization/ko.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/ko.lproj/Localizable.strings @@ -185,6 +185,9 @@ "settings.swipeactions.status.use-theme-colors" = "기본 색상 대신 테마 색상 사용"; "settings.swipeactions.status.icon-style" = "아이콘 모양"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "둘러보기"; "tab.federated" = "연합"; diff --git a/IceCubesApp/Resources/Localization/nb.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/nb.lproj/Localizable.strings index 23dd0f69..e0d8b33f 100644 --- a/IceCubesApp/Resources/Localization/nb.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/nb.lproj/Localizable.strings @@ -185,6 +185,9 @@ "settings.swipeactions.status.use-theme-colors" = "Use theme colors instead of default colors"; "settings.swipeactions.status.icon-style" = "Icon style"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "Utforsk"; "tab.federated" = "Federert"; diff --git a/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings index b507958f..db961bb4 100644 --- a/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings @@ -182,6 +182,9 @@ "settings.swipeactions.status.use-theme-colors" = "Gebruik themakleuren in plaats van standaardkleuren"; "settings.swipeactions.status.icon-style" = "Symboolstijl"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "Ontdekken"; "tab.federated" = "Gefedereerd"; diff --git a/IceCubesApp/Resources/Localization/pl.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/pl.lproj/Localizable.strings index 8c80b2cb..85fd2a6b 100644 --- a/IceCubesApp/Resources/Localization/pl.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/pl.lproj/Localizable.strings @@ -185,6 +185,9 @@ "settings.swipeactions.status.use-theme-colors" = "Używaj kolorów motywu zamiast kolorów domyślnych"; "settings.swipeactions.status.icon-style" = "Styl ikony"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "Odkrywaj"; "tab.federated" = "Globalny"; diff --git a/IceCubesApp/Resources/Localization/pt-BR.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/pt-BR.lproj/Localizable.strings index ded99d14..9933259c 100644 --- a/IceCubesApp/Resources/Localization/pt-BR.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/pt-BR.lproj/Localizable.strings @@ -185,6 +185,9 @@ "settings.swipeactions.status.use-theme-colors" = "Use theme colors instead of default colors"; "settings.swipeactions.status.icon-style" = "Icon style"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "Explorar"; "tab.federated" = "Linha global"; diff --git a/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings index 0bef4d56..8c9ade00 100644 --- a/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings @@ -185,6 +185,9 @@ "settings.swipeactions.status.use-theme-colors" = "Use theme colors instead of default colors"; "settings.swipeactions.status.icon-style" = "Icon style"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "Keşfet"; "tab.federated" = "Birleştirilmiş"; diff --git a/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings index 47b63519..3be73080 100644 --- a/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings @@ -185,6 +185,9 @@ "settings.swipeactions.status.use-theme-colors" = "使用主题色而不是默认色"; "settings.swipeactions.status.icon-style" = "图标样式"; +"settings.display.section.font" = "Font"; +"settings.display.font.rounded" = "Use SF Rounded"; + // MARK: Tabs "tab.explore" = "探索"; "tab.federated" = "跨站"; diff --git a/Packages/DesignSystem/Sources/DesignSystem/Font.swift b/Packages/DesignSystem/Sources/DesignSystem/Font.swift index f20fef80..95c1c524 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/Font.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/Font.swift @@ -19,7 +19,7 @@ public extension Font { return .custom(chosenFont.fontName, size: size, relativeTo: textStyle) } - return .system(size: size) + return .system(size: size, design: UserPreferences.shared.useSFRoundedFont ? .rounded : .default) } private static func customUIFont(size: CGFloat) -> UIFont { diff --git a/Packages/Env/Sources/Env/UserPreferences.swift b/Packages/Env/Sources/Env/UserPreferences.swift index 4647e181..98d937e8 100644 --- a/Packages/Env/Sources/Env/UserPreferences.swift +++ b/Packages/Env/Sources/Env/UserPreferences.swift @@ -47,6 +47,8 @@ public class UserPreferences: ObservableObject { @AppStorage("swipeactions-status-leading-right") public var swipeActionsStatusLeadingRight = StatusAction.none @AppStorage("swipeactions-use-theme-color") public var swipeActionsUseThemeColor = false @AppStorage("swipeactions-icon-style") public var swipeActionsIconStyle: SwipeActionsIconStyle = .iconWithText + + @AppStorage("font_use_sf_rounded") public var useSFRoundedFont = false public enum SwipeActionsIconStyle: String, CaseIterable { case iconWithText, iconOnly