Commit fae1458f0e

fae1458f0e97c353b1b784f27c1a5bc1511b8078

parent: a4c47682fd

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-25 23:49 UTC

iOS Settings: Body Font and Text Width

Settings ▸ Appearance sets theme.body-font and theme.text-width, written to
config.toml as the Mac's Settings write them. The defaults are unchanged.

Ref #222

Layout: unified · split

Changed files (3)
Sources/OrgstarMobile/SettingsScreen.swift +29 −1 · view
@@ -105,7 +105,7 @@ struct SettingsScreen: View {
105105 } footer: {
106106 if badges == false { Text("Turn on Badges in orgstar's notification settings.") }
107107 }
108 Section("Appearance") {
108 Section {
109109 let _ = model.settingsVersion
110110 NavigationLink {
111111 ThemePickerScreen(model: model, appearance: .light)
@@ -122,6 +122,28 @@ struct SettingsScreen: View {
122122 } label: {
123123 LabeledContent("App Icon", value: AppIcons.name(appIcon))
124124 }
125 Picker("Body Font", selection: Binding {
126 UserDefaults.standard.string(forKey: "themeBodyFont") ?? ""
127 } set: { model.set("themeBodyFont", to: .string($0)) }) {
128 let body = UserDefaults.standard.string(forKey: "themeBodyFont") ?? ""
129 Text("Same as Font").tag("")
130 Text("System").tag("system")
131 ForEach(Self.proportionalFamilies, id: \.self) { Text($0).tag($0) }
132 if !["", "system"].contains(body), !Self.proportionalFamilies.contains(body) { Text(body).tag(body) }
133 }
134 .pickerStyle(.navigationLink)
135 Picker("Text Width", selection: Binding {
136 UserDefaults.standard.integer(forKey: "themeTextWidth")
137 } set: { model.set("themeTextWidth", to: .integer($0)) }) {
138 let width = UserDefaults.standard.integer(forKey: "themeTextWidth")
139 Text("Whole Screen").tag(0)
140 ForEach([60, 70, 80, 90, 100, 120], id: \.self) { Text("\($0) columns").tag($0) }
141 if ![0, 60, 70, 80, 90, 100, 120].contains(width) { Text("\(width) columns").tag(width) }
142 }
143 } header: {
144 Text("Appearance")
145 } footer: {
146 Text("With a Body Font, prose uses it while tables, code, dates, tags and drawers keep the monospaced font. Text Width keeps lines to that many columns, centred, on a screen wider than that.")
125147 }
126148 calendarSection
127149 reminderSection
@@ -274,6 +296,12 @@ struct SettingsScreen: View {
274296 model.set(key, to: .string(value))
275297 }
276298
299 /// Installed proportional font families, for prose.
300 private static let proportionalFamilies: [String] = UIFont.familyNames.sorted().filter { family in
301 guard let name = UIFont.fontNames(forFamilyName: family).first, let font = UIFont(name: name, size: 13) else { return false }
302 return !font.fontDescriptor.symbolicTraits.contains(.traitMonoSpace)
303 }
304
277305 /// The span and start day, worded as the Mac's Settings word the start.
278306 private var agenda: String {
279307 func days(_ count: Int) -> String { count == 1 ? "1 day" : "\(count) days" }
docs/manual/guide/14-ios.org +1 −1 · view
@@ -85,7 +85,7 @@ Files that aren't valid UTF-8 open read-only; commands that would change them sa
8585
8686The editor and the reader use the theme set in the configuration folder's =config.toml=, stacked as on the Mac: the themes chosen with =light-theme= and =dark-theme=, then the theme file named by =theme-file=, then the colours in =[theme]=, =[theme.light]=, =[theme.dark]=, =[theme.todo]= and =[theme.category]=. A TODO keyword without a colour in =[theme.todo]= takes its class's colour: =todo-next= for =NEXT= and =STRT=, =todo-waiting= for =WAIT= and =HOLD=, =todo-cancelled= for =KILL= and =CANCELLED=, and so on (see [[file:13-configuration.org][Configuration]] for the lists). Colours follow the system's light or dark appearance. Problems in the theme show in the Settings tab with the other problems. A change to =config.toml= or the theme file applies as it syncs, to open editors too. See [[file:13-configuration.org][Configuration]] for the colour keys.
8787
88Settings ▸ Light Theme and Dark Theme choose the built-in themes, shown as a few lines of Org in each theme's colours; with a configuration folder the choice is written to its =config.toml=, so the Mac uses it too. Settings ▸ App Icon chooses the home screen icon from the same thirteen as the Mac; iOS confirms the change. The icon is chosen per device.
88Settings ▸ Light Theme and Dark Theme choose the built-in themes, shown as a few lines of Org in each theme's colours; with a configuration folder the choice is written to its =config.toml=, so the Mac uses it too. Settings ▸ App Icon chooses the home screen icon from the same thirteen as the Mac; iOS confirms the change. The icon is chosen per device. Settings ▸ Body Font (=body-font=: Same as Font, System or an installed proportional family) and Text Width (=text-width=: Whole Screen or 60 to 120 columns) are written the same way.
8989
9090- Font :: =font= when that family is installed on the device, otherwise the system's monospaced font. =body-font=, when set, is used for prose as on the Mac.
9191- Size :: =font-size= is the size at the default Dynamic Type setting, 13 pt by default. Text grows and shrinks with the text size chosen in the system Settings app.
l10n/Localizable.xcstrings +136 · view
@@ -5279,6 +5279,40 @@
52795279 }
52805280 }
52815281 },
5282 "Body Font": {
5283 "localizations": {
5284 "de": {
5285 "stringUnit": {
5286 "state": "translated",
5287 "value": "Schrift für Fließtext"
5288 }
5289 },
5290 "es": {
5291 "stringUnit": {
5292 "state": "translated",
5293 "value": "Tipo de letra del cuerpo"
5294 }
5295 },
5296 "fr": {
5297 "stringUnit": {
5298 "state": "translated",
5299 "value": "Police du texte courant"
5300 }
5301 },
5302 "ja": {
5303 "stringUnit": {
5304 "state": "translated",
5305 "value": "本文のフォント"
5306 }
5307 },
5308 "pt-BR": {
5309 "stringUnit": {
5310 "state": "translated",
5311 "value": "Fonte do Corpo"
5312 }
5313 }
5314 }
5315 },
52825316 "Body Only": {
52835317 "localizations": {
52845318 "de": {
@@ -36245,6 +36279,40 @@
3624536279 }
3624636280 }
3624736281 },
36282 "Text Width": {
36283 "localizations": {
36284 "de": {
36285 "stringUnit": {
36286 "state": "translated",
36287 "value": "Textbreite"
36288 }
36289 },
36290 "es": {
36291 "stringUnit": {
36292 "state": "translated",
36293 "value": "Ancho del texto"
36294 }
36295 },
36296 "fr": {
36297 "stringUnit": {
36298 "state": "translated",
36299 "value": "Largeur du texte"
36300 }
36301 },
36302 "ja": {
36303 "stringUnit": {
36304 "state": "translated",
36305 "value": "テキスト幅"
36306 }
36307 },
36308 "pt-BR": {
36309 "stringUnit": {
36310 "state": "translated",
36311 "value": "Largura do Texto"
36312 }
36313 }
36314 }
36315 },
3624836316 "Text width": {
3624936317 "localizations": {
3625036318 "de": {
@@ -39890,6 +39958,40 @@
3989039958 }
3989139959 }
3989239960 },
39961 "Whole Screen": {
39962 "localizations": {
39963 "de": {
39964 "stringUnit": {
39965 "state": "translated",
39966 "value": "Ganzer Bildschirm"
39967 }
39968 },
39969 "es": {
39970 "stringUnit": {
39971 "state": "translated",
39972 "value": "Toda la pantalla"
39973 }
39974 },
39975 "fr": {
39976 "stringUnit": {
39977 "state": "translated",
39978 "value": "Écran entier"
39979 }
39980 },
39981 "ja": {
39982 "stringUnit": {
39983 "state": "translated",
39984 "value": "画面全体"
39985 }
39986 },
39987 "pt-BR": {
39988 "stringUnit": {
39989 "state": "translated",
39990 "value": "Tela Inteira"
39991 }
39992 }
39993 }
39994 },
3989339995 "Whole editor": {
3989439996 "localizations": {
3989539997 "de": {
@@ -40027,6 +40129,40 @@
4002740129 }
4002840130 }
4002940131 },
40132 "With a Body Font, prose uses it while tables, code, dates, tags and drawers keep the monospaced font. Text Width keeps lines to that many columns, centred, on a screen wider than that.": {
40133 "localizations": {
40134 "de": {
40135 "stringUnit": {
40136 "state": "translated",
40137 "value": "Mit einer Schrift für Fließtext wird Prosa in ihr gesetzt, während Tabellen, Code, Daten, Tags und Schubladen die Festbreitenschrift behalten. Die Textbreite begrenzt Zeilen auf so viele Spalten, zentriert, auf einem breiteren Bildschirm."
40138 }
40139 },
40140 "es": {
40141 "stringUnit": {
40142 "state": "translated",
40143 "value": "Con un tipo de letra del cuerpo, la prosa lo usa mientras las tablas, el código, las fechas, las etiquetas y los cajones mantienen el tipo monoespaciado. El ancho del texto limita las líneas a esas columnas, centradas, en una pantalla más ancha."
40144 }
40145 },
40146 "fr": {
40147 "stringUnit": {
40148 "state": "translated",
40149 "value": "Avec une police du texte courant, la prose l'utilise tandis que les tableaux, le code, les dates, les étiquettes et les tiroirs gardent la police à chasse fixe. La largeur du texte limite les lignes à ce nombre de colonnes, centrées, sur un écran plus large."
40150 }
40151 },
40152 "ja": {
40153 "stringUnit": {
40154 "state": "translated",
40155 "value": "本文のフォントを設定すると、文章にはそのフォントが使われ、表、コード、日付、タグ、ドロワーは等幅フォントのままです。テキスト幅は、それより広い画面で行をその桁数に収めて中央に置きます。"
40156 }
40157 },
40158 "pt-BR": {
40159 "stringUnit": {
40160 "state": "translated",
40161 "value": "Com uma Fonte do Corpo, a prosa a usa enquanto tabelas, código, datas, tags e gavetas mantêm a fonte monoespaçada. A Largura do Texto limita as linhas a essa quantidade de colunas, centralizadas, em uma tela mais larga."
40162 }
40163 }
40164 }
40165 },
4003040166 "Word Count": {
4003140167 "localizations": {
4003240168 "de": {
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form