fontist 2.1.4 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop_todo.yml +411 -10
  4. data/Gemfile +1 -0
  5. data/docs/.vitepress/config.ts +17 -0
  6. data/docs/cli/create-formula.md +6 -0
  7. data/docs/cli/import.md +4 -0
  8. data/docs/guide/formulas.md +73 -0
  9. data/docs/guide/installation.md +62 -0
  10. data/docs/guide/maintainer/import.md +372 -0
  11. data/docs/guide/maintainer/index.md +37 -0
  12. data/docs/guide/platforms/index.md +72 -0
  13. data/docs/guide/platforms/macos.md +151 -0
  14. data/docs/guide/platforms/windows.md +220 -0
  15. data/fontist.gemspec +0 -1
  16. data/lib/fontist/cache/manager.rb +0 -2
  17. data/lib/fontist/cache.rb +6 -0
  18. data/lib/fontist/cli/thor_ext.rb +0 -2
  19. data/lib/fontist/cli.rb +0 -9
  20. data/lib/fontist/collection_file.rb +0 -3
  21. data/lib/fontist/font.rb +0 -6
  22. data/lib/fontist/font_collection.rb +0 -1
  23. data/lib/fontist/font_file.rb +0 -1
  24. data/lib/fontist/font_installer.rb +0 -5
  25. data/lib/fontist/font_model.rb +0 -1
  26. data/lib/fontist/font_path.rb +0 -2
  27. data/lib/fontist/formula.rb +0 -13
  28. data/lib/fontist/formula_picker.rb +0 -2
  29. data/lib/fontist/google_import_source.rb +0 -2
  30. data/lib/fontist/import/convert_formulas.rb +0 -2
  31. data/lib/fontist/import/create_formula.rb +0 -4
  32. data/lib/fontist/import/files/collection_file.rb +0 -1
  33. data/lib/fontist/import/files.rb +8 -0
  34. data/lib/fontist/import/font_metadata_extractor.rb +0 -1
  35. data/lib/fontist/import/formula_builder.rb +0 -6
  36. data/lib/fontist/import/google/api.rb +0 -9
  37. data/lib/fontist/import/google/data_sources/base.rb +0 -1
  38. data/lib/fontist/import/google/data_sources/github.rb +0 -3
  39. data/lib/fontist/import/google/data_sources/ttf.rb +0 -2
  40. data/lib/fontist/import/google/data_sources/vf.rb +0 -2
  41. data/lib/fontist/import/google/data_sources/woff2.rb +0 -2
  42. data/lib/fontist/import/google/data_sources.rb +13 -0
  43. data/lib/fontist/import/google/font_database.rb +0 -10
  44. data/lib/fontist/import/google/metadata_adapter.rb +0 -1
  45. data/lib/fontist/import/google/models/font_family.rb +0 -1
  46. data/lib/fontist/import/google/models/metadata.rb +1 -9
  47. data/lib/fontist/import/google/models/source_metadata.rb +0 -1
  48. data/lib/fontist/import/google/models.rb +16 -0
  49. data/lib/fontist/import/google.rb +7 -2
  50. data/lib/fontist/import/google_fonts_importer.rb +0 -5
  51. data/lib/fontist/import/google_import.rb +1 -8
  52. data/lib/fontist/import/helpers.rb +8 -0
  53. data/lib/fontist/import/macos.rb +0 -6
  54. data/lib/fontist/import/manual_formula_builder.rb +0 -2
  55. data/lib/fontist/import/models.rb +7 -0
  56. data/lib/fontist/import/otf/font_file.rb +0 -2
  57. data/lib/fontist/import/otf.rb +7 -0
  58. data/lib/fontist/import/recursive_extraction.rb +0 -5
  59. data/lib/fontist/import/sil_import.rb +0 -3
  60. data/lib/fontist/import/upgrade_formulas.rb +1 -11
  61. data/lib/fontist/import.rb +23 -0
  62. data/lib/fontist/import_cli.rb +0 -9
  63. data/lib/fontist/index.rb +0 -4
  64. data/lib/fontist/index_cli.rb +0 -2
  65. data/lib/fontist/indexes/base_font_collection_index.rb +0 -1
  66. data/lib/fontist/indexes/default_family_font_index.rb +0 -2
  67. data/lib/fontist/indexes/directory_snapshot.rb +0 -2
  68. data/lib/fontist/indexes/filename_index.rb +0 -2
  69. data/lib/fontist/indexes/font_index.rb +0 -3
  70. data/lib/fontist/indexes/fontist_index.rb +0 -2
  71. data/lib/fontist/indexes/incremental_index_updater.rb +0 -4
  72. data/lib/fontist/indexes/preferred_family_font_index.rb +0 -2
  73. data/lib/fontist/indexes/system_index.rb +0 -2
  74. data/lib/fontist/indexes/user_index.rb +0 -2
  75. data/lib/fontist/indexes.rb +18 -0
  76. data/lib/fontist/install_location.rb +0 -4
  77. data/lib/fontist/install_locations/fontist_location.rb +0 -2
  78. data/lib/fontist/install_locations/system_location.rb +0 -2
  79. data/lib/fontist/install_locations/user_location.rb +0 -2
  80. data/lib/fontist/install_locations.rb +8 -0
  81. data/lib/fontist/macos/catalog/asset.rb +0 -2
  82. data/lib/fontist/macos/catalog/base_parser.rb +0 -1
  83. data/lib/fontist/macos/catalog/catalog_manager.rb +0 -6
  84. data/lib/fontist/macos/catalog/font3_parser.rb +0 -2
  85. data/lib/fontist/macos/catalog/font4_parser.rb +0 -2
  86. data/lib/fontist/macos/catalog/font5_parser.rb +0 -2
  87. data/lib/fontist/macos/catalog/font6_parser.rb +0 -2
  88. data/lib/fontist/macos/catalog/font7_parser.rb +0 -2
  89. data/lib/fontist/macos/catalog/font8_parser.rb +0 -2
  90. data/lib/fontist/macos/catalog.rb +15 -0
  91. data/lib/fontist/macos.rb +5 -0
  92. data/lib/fontist/macos_import_source.rb +0 -2
  93. data/lib/fontist/manifest_request.rb +0 -1
  94. data/lib/fontist/manifest_response.rb +0 -1
  95. data/lib/fontist/resources.rb +7 -0
  96. data/lib/fontist/sil_import_source.rb +0 -2
  97. data/lib/fontist/system_font.rb +0 -2
  98. data/lib/fontist/system_index.rb +0 -4
  99. data/lib/fontist/utils/cache.rb +0 -2
  100. data/lib/fontist/utils/downloader.rb +0 -4
  101. data/lib/fontist/utils.rb +10 -8
  102. data/lib/fontist/validate_cli.rb +0 -4
  103. data/lib/fontist/validator.rb +0 -2
  104. data/lib/fontist/version.rb +1 -1
  105. data/lib/fontist.rb +83 -36
  106. metadata +19 -16
@@ -0,0 +1,372 @@
1
+ ---
2
+ title: Importing Fonts from External Sources
3
+ ---
4
+
5
+ # Importing Fonts from External Sources
6
+
7
+ ::: warning Maintainer Only
8
+ The documentation is for Fontist formula maintainers only. End users should use `fontist install` to install fonts from the official repository.
9
+ :::
10
+
11
+ Fontist can automatically generate formulas from external font sources including Google Fonts, macOS supplementary fonts, and SIL International fonts.
12
+
13
+ ---
14
+
15
+ ## Google Fonts Import
16
+
17
+ ### Overview
18
+
19
+ [Google Fonts](https://fonts.google.com) provides the largest collection of freely licensed fonts. Fontist maintains formulas for all Google Fonts and supports importing them.
20
+
21
+ ### Data Sources
22
+
23
+ The Google Fonts importer uses multiple data sources:
24
+
25
+ #### Four Equal Data Sources
26
+
27
+ | Source | Provides |
28
+ |--------|----------|
29
+ | **Ttf** (API) | TTF download URLs |
30
+ | **Vf** (API) | Variable font URLs + axes information |
31
+ | **Woff2** (API) | WOFF2 web font URLs |
32
+ | **Github** (Repo) | Font metadata (designer, license, category) |
33
+
34
+ ### Architecture
35
+
36
+ The importer uses a layered architecture.
37
+
38
+ ```
39
+ ┌──────────────────────────┐
40
+ │ FontDatabase │
41
+ │ (Single Entry Point) │
42
+ └───────────┬──────────────┘
43
+
44
+ ┌─────────────┼─────────────┬─────────────┐
45
+ │ │ │ │
46
+ ▼ ▼ ▼ ▼
47
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
48
+ │ Ttf │ │ Vf │ │ Woff2 │ │ Github │
49
+ │ (API) │ │ (API) │ │ (API) │ │ (Repo) │
50
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘
51
+
52
+ All 4 Data Sources Are Equal
53
+ ```
54
+
55
+ ### Prerequisites
56
+
57
+ 1. **Local checkout** of the [google/fonts](https://github.com/google/fonts) repository
58
+
59
+ 2. **Google Fonts API key** (get one from [Google Cloud Console](https://console.cloud.google.com/))
60
+
61
+ ```sh
62
+ export GOOGLE_FONTS_API_KEY="your_api_key_here"
63
+ ```
64
+
65
+ ### Import Command
66
+
67
+ Import all Google Fonts.
68
+
69
+ ```sh
70
+ fontist import google \
71
+ --source-path /path/to/google/fonts \
72
+ --output-path Formulas/google \
73
+ --verbose \
74
+ --import-cache /tmp/fontist-google-cache
75
+ ```
76
+
77
+ Import a single font family.
78
+
79
+ ```sh
80
+ fontist import google \
81
+ --font-family "Roboto" \
82
+ --source-path /path/to/google/fonts \
83
+ --verbose
84
+ ```
85
+
86
+ ### Options
87
+
88
+ | Option | Description |
89
+ |--------|-------------|
90
+ | `--source-path` | Path to checked-out google/fonts repository |
91
+ | `--output-path` | Output directory for generated formulas (default: `./Formulas/google`) |
92
+ | `--font-family` | Import specific font family by name |
93
+ | `--force` | Overwrite existing formulas |
94
+ | `--verbose` | Enable detailed progress output |
95
+ | `--import-cache` | Directory for caching downloaded archives |
96
+
97
+ ### Ruby API
98
+
99
+ ```ruby
100
+ require 'fontist/import/google/font_database'
101
+
102
+ # Build database from all 4 sources
103
+ db = Fontist::Import::Google::FontDatabase.build(
104
+ api_key: ENV['GOOGLE_FONTS_API_KEY'],
105
+ source_path: '/path/to/google/fonts'
106
+ )
107
+
108
+ # Query merged data
109
+ roboto = db.font_by_name('Roboto')
110
+ puts roboto.designer # From Github repository
111
+ puts roboto.axes.count # From API (VF endpoint)
112
+
113
+ # Generate formulas
114
+ db.save_formulas('./formulas') # All fonts
115
+ db.save_formulas('./formulas', family_name: 'Roboto') # Single font
116
+ ```
117
+
118
+ ### Automated Updates
119
+
120
+ Fontist uses a [GitHub Actions workflow](https://github.com/fontist/formulas/blob/v4/.github/workflows/google.yml) to check for updated fonts on Google Fonts daily.
121
+
122
+ New, updated, or removed fonts are automatically committed to the [Fontist formula repository](https://github.com/fontist/formulas).
123
+
124
+ ---
125
+
126
+ ## SIL Fonts Import
127
+
128
+ ### Overview
129
+
130
+ [SIL International](https://www.sil.org) is an organization that serves language communities worldwide. SIL provides unique fonts supporting smaller language communities with Unicode support often not available in mainstream fonts.
131
+
132
+ ### Import Command
133
+
134
+ Import all SIL fonts.
135
+
136
+ ```sh
137
+ fontist import sil \
138
+ --output-path Formulas/sil \
139
+ --verbose \
140
+ --import-cache /tmp/sil-import-cache
141
+ ```
142
+
143
+ Import a single SIL font.
144
+
145
+ ```sh
146
+ fontist import sil \
147
+ --font-name "Andika" \
148
+ --output-path Formulas/sil \
149
+ --verbose \
150
+ --import-cache /tmp/sil-import-cache
151
+ ```
152
+
153
+ ### Options
154
+
155
+ | Option | Description |
156
+ |--------|-------------|
157
+ | `--output-path` | Output directory for generated formulas |
158
+ | `--font-name` | Import specific font by name |
159
+ | `--force` | Overwrite existing formulas |
160
+ | `--verbose` | Enable detailed progress output |
161
+ | `--import-cache` | Directory for caching downloaded archives |
162
+
163
+ ---
164
+
165
+ ## macOS Supplementary Fonts Import
166
+
167
+ ### Overview
168
+
169
+ macOS supplementary fonts use multi-dimensional versioning with framework versions, catalog posted dates, and asset build IDs.
170
+
171
+ ### Import Command
172
+
173
+ Import from macOS font catalogs.
174
+
175
+ ```sh
176
+ fontist import macos \
177
+ --plist com_apple_MobileAsset_Font7.xml \
178
+ --output-path Formulas/macos/font7 \
179
+ --verbose \
180
+ --import-cache /tmp/fontist-macos-cache \
181
+ --force
182
+ ```
183
+
184
+ Import a single macOS font.
185
+
186
+ ```sh
187
+ fontist import macos \
188
+ --plist com_apple_MobileAsset_Font7.xml \
189
+ --font-name "Hiragino" \
190
+ --output-path Formulas/macos/font7 \
191
+ --verbose
192
+ ```
193
+
194
+ ### Finding Catalog Files
195
+
196
+ Run `fontist macos-catalogs` to list available font catalogs on your system.
197
+
198
+ ### Catalog URLs
199
+
200
+ Catalogs are also available from Apple's Mobile Asset Server.
201
+
202
+ | Version | URL |
203
+ |---------|-----|
204
+ | Font 3 | `https://mesu.apple.com/assets/macos/com_apple_MobileAsset_Font3/com_apple_MobileAsset_Font3.xml` |
205
+ | Font 4 | `https://mesu.apple.com/assets/macos/com_apple_MobileAsset_Font4/com_apple_MobileAsset_Font4.xml` |
206
+ | Font 5 | `https://mesu.apple.com/assets/macos/com_apple_MobileAsset_Font5/com_apple_MobileAsset_Font5.xml` |
207
+ | Font 6 | `https://mesu.apple.com/assets/macos/com_apple_MobileAsset_Font6/com_apple_MobileAsset_Font6.xml` |
208
+ | Font 7 | `https://mesu.apple.com/assets/macos/com_apple_MobileAsset_Font7/com_apple_MobileAsset_Font7.xml` |
209
+ | Font 8 | `https://mesu.apple.com/assets/macos/com_apple_MobileAsset_Font8/com_apple_MobileAsset_Font8.xml` |
210
+
211
+ ---
212
+
213
+ ## Import Source Architecture
214
+
215
+ ### Import Source Attribute
216
+
217
+ Formulas with import sources track metadata about their origin.
218
+
219
+ #### macOS Import Source
220
+
221
+ ```yaml
222
+ import_source:
223
+ type: macos
224
+ framework_version: 7
225
+ posted_date: "2024-08-13T18:11:00Z"
226
+ asset_id: "10m1360"
227
+ ```
228
+
229
+ #### Google Fonts Import Source
230
+
231
+ ```yaml
232
+ import_source:
233
+ type: google
234
+ commit_id: "abc123def456"
235
+ api_version: "v1"
236
+ last_modified: "2024-01-01T12:00:00Z"
237
+ family_id: "roboto"
238
+ ```
239
+
240
+ #### SIL Import Source
241
+
242
+ ```yaml
243
+ import_source:
244
+ type: sil
245
+ version: "1.0.0"
246
+ release_date: "2024-01-01"
247
+ ```
248
+
249
+ ### Versioned Filenames
250
+
251
+ Import source type determines filename format.
252
+
253
+ | Source | Format | Example |
254
+ |--------|--------|---------|
255
+ | macOS | `{name}_{asset_id}.yml` | `al_bayan_10m1360.yml` |
256
+ | Google | `{name}.yml` | `roboto.yml` (no versioning) |
257
+ | SIL | `{name}_{version}.yml` | `charis_sil_6.200.yml` |
258
+
259
+ ### Why Different Strategies?
260
+
261
+ - **macOS**: Multiple versions coexist for different macOS versions
262
+ - **Google**: Live service always points to latest; commit tracked for metadata only
263
+ - **SIL**: Versioned releases need coexistence
264
+
265
+ ---
266
+
267
+ ## Import Cache Management
268
+
269
+ ### Overview
270
+
271
+ During formula imports, Fontist downloads font archives for analysis. The import cache optimizes performance and avoids redundant downloads.
272
+
273
+ Default location: `~/.fontist/import_cache`
274
+
275
+ ### Configuration Methods
276
+
277
+ #### CLI Option
278
+
279
+ ```sh
280
+ fontist import google --import-cache /custom/path ...
281
+ fontist import macos --import-cache /custom/path ...
282
+ fontist import sil --import-cache /custom/path ...
283
+ ```
284
+
285
+ #### Ruby API
286
+
287
+ ```ruby
288
+ # Global setting
289
+ Fontist.import_cache_path = "/custom/import/cache"
290
+
291
+ # Per-import setting
292
+ Fontist::Import::Macos.new(
293
+ plist_path,
294
+ import_cache: "/custom/cache"
295
+ ).call
296
+ ```
297
+
298
+ #### Environment Variable
299
+
300
+ ```sh
301
+ export FONTIST_IMPORT_CACHE=/custom/import/cache
302
+ fontist import macos ...
303
+ ```
304
+
305
+ ### Cache Management
306
+
307
+ Clear the import cache.
308
+
309
+ ```sh
310
+ fontist cache clear-import
311
+ ```
312
+
313
+ View cache information.
314
+
315
+ ```sh
316
+ fontist cache info
317
+ ```
318
+
319
+ ---
320
+
321
+ ## Verbose Output
322
+
323
+ Enable `--verbose` for detailed progress tracking.
324
+
325
+ ```sh
326
+ fontist import macos --plist catalog.xml --verbose
327
+ ```
328
+
329
+ Output includes.
330
+
331
+ - Paint-colored headers with Unicode box characters
332
+ - Import cache location
333
+ - Download URLs and cache status
334
+ - Extraction directory paths
335
+ - Real-time progress with percentages
336
+ - Per-font status indicators
337
+ - Detailed summary statistics
338
+
339
+ ### Example Output
340
+
341
+ ```
342
+ ════════════════════════════════════════════════════════════════════
343
+ 📦 macOS Supplementary Fonts Import
344
+ ════════════════════════════════════════════════════════════════════
345
+
346
+ 📦 Import cache: /Users/user/.fontist/import_cache
347
+ 📁 Output path: /Users/user/.fontist/versions/v4/formulas/Formulas/macos/font7
348
+
349
+ (1/3) 33.3% | Hiragino Sans (2 fonts)
350
+ Downloading from: https://updates.cdn-apple.com/.../font.zip
351
+ Cache location: /Users/user/.fontist/import_cache
352
+ Extracting to: /var/folders/.../temp
353
+ Extraction cache cleared
354
+ ✓ Formula created: hiragino_sans_10m1044.yml (3.98s)
355
+
356
+ ════════════════════════════════════════════════════════════════════
357
+ 📊 Import Summary
358
+ ════════════════════════════════════════════════════════════════════
359
+
360
+ Total packages: 3
361
+ ✓ Successful: 3 (100.0%)
362
+
363
+ 🎉 Great success! 3 formulas created!
364
+ ```
365
+
366
+ ---
367
+
368
+ ## See Also
369
+
370
+ - [Formulas Guide](/guide/formulas) - How formulas work
371
+ - [repo Command](/cli/repo) - Managing formula repositories
372
+ - [cache Command](/cli/cache) - Cache management
@@ -0,0 +1,37 @@
1
+ ---
2
+ title: Maintainer Documentation
3
+ ---
4
+
5
+ # Maintainer Documentation
6
+
7
+ ::: warning For Fontist Maintainers Only
8
+ This section contains documentation for Fontist formula maintainers. End users typically do not need these commands.
9
+ :::
10
+
11
+ ## Topics
12
+
13
+ ### [Import Commands](/guide/maintainer/import)
14
+
15
+ Import fonts from external sources to create Fontist formulas:
16
+ - Google Fonts
17
+ - macOS supplementary fonts
18
+ - SIL International fonts
19
+
20
+ ---
21
+
22
+ ## Who Should Use These Commands?
23
+
24
+ You should use these commands if you are:
25
+
26
+ - A **Fontist formula maintainer** updating the official formula repository
27
+ - Creating formulas from **large font collections** (Google Fonts, macOS, SIL)
28
+ - Contributing new formulas to the **fontist/formulas** repository
29
+
30
+ ## Regular Users
31
+
32
+ If you just want to install fonts, you don't need these commands. Instead:
33
+
34
+ - Use `fontist install "Font Name"` to install fonts
35
+ - Use `fontist create-formula <url>` to create a single formula from a font archive
36
+
37
+ See the [Getting Started Guide](/guide/) for regular usage.
@@ -0,0 +1,72 @@
1
+ ---
2
+ title: Platform Guides
3
+ ---
4
+
5
+ # Platform Guides
6
+
7
+ Fontist works consistently across macOS, Windows, and Linux, but each platform has unique characteristics and features.
8
+
9
+ ## Available Platform Guides
10
+
11
+ ### [macOS](/guide/platforms/macos)
12
+
13
+ Learn about:
14
+ - macOS supplementary fonts framework
15
+ - Framework versioning (Font3-Font8)
16
+ - Platform-specific font installation
17
+ - Version compatibility
18
+
19
+ ### [Windows](/guide/platforms/windows)
20
+
21
+ Learn about:
22
+ - Windows font locations
23
+ - Administrator privileges
24
+ - File locking considerations
25
+ - Troubleshooting Windows-specific issues
26
+
27
+ ---
28
+
29
+ ## Quick Comparison
30
+
31
+ | Feature | macOS | Windows | Linux |
32
+ |---------|-------|---------|-------|
33
+ | System fonts | `/Library/Fonts` | `C:\Windows\Fonts` | `/usr/share/fonts` |
34
+ | User fonts | `~/Library/Fonts` | `%LOCALAPPDATA%\...\Fonts` | `~/.local/share/fonts` |
35
+ | Supplementary fonts | ✅ Framework | ❌ | ❌ |
36
+ | Fontconfig | ✅ Optional | ✅ Optional | ✅ Recommended |
37
+ | Admin for system | Yes | Yes | Yes |
38
+
39
+ ---
40
+
41
+ ## Platform-Specific Features
42
+
43
+ ### macOS Supplementary Fonts
44
+
45
+ macOS includes a supplementary fonts framework for licensed fonts. Fontist can install these fonts automatically:
46
+
47
+ ```sh
48
+ fontist install "Canela"
49
+ ```
50
+
51
+ See the [macOS guide](/guide/platforms/macos) for details.
52
+
53
+ ### Windows Font Management
54
+
55
+ Windows uses different font locations and has stricter file locking:
56
+
57
+ ```powershell
58
+ # Install to user fonts (no admin needed)
59
+ fontist install "Roboto" --location user
60
+ ```
61
+
62
+ See the [Windows guide](/guide/platforms/windows) for details.
63
+
64
+ ### Linux Fontconfig
65
+
66
+ On Linux, Fontist integrates with fontconfig to make fonts available system-wide:
67
+
68
+ ```sh
69
+ fontist fontconfig update
70
+ ```
71
+
72
+ See the [Fontconfig guide](/guide/fontconfig) for details.
@@ -0,0 +1,151 @@
1
+ ---
2
+ title: macOS Platform Guide
3
+ ---
4
+
5
+ # macOS Platform Guide
6
+
7
+ Fontist provides special support for macOS supplementary fonts, a framework introduced in macOS 10.12 (Sierra) for dynamically downloading licensed fonts on demand.
8
+
9
+ ## Supplementary Fonts Overview
10
+
11
+ macOS provides a "supplementary fonts" framework (shared with iOS) for dynamically downloading and installing a wide range of licensed fonts. These fonts are typically commercial fonts that come free with macOS.
12
+
13
+ ### Typical Use Cases
14
+
15
+ - CI jobs on macOS environments using specially-licensed fonts
16
+ - Automating installation of macOS add-on fonts
17
+ - Accessing platform-specific fonts not available elsewhere
18
+
19
+ ::: warning Non-macOS Installation
20
+ Fontist does not allow installing macOS-specific fonts on non-macOS platforms due to font license restrictions.
21
+ :::
22
+
23
+ ---
24
+
25
+ ## Framework Versioning
26
+
27
+ The macOS supplementary font catalog is bound to specific framework versions. Different versions contain different sets of fonts, and often different versions of the same fonts.
28
+
29
+ ### Version Compatibility
30
+
31
+ | macOS Version | Framework Version | Platform Tag |
32
+ |---------------|-------------------|--------------|
33
+ | macOS 10.12 (Sierra) | Font 3 | `macos-font3` |
34
+ | macOS 10.13 (High Sierra) | Font 4 | `macos-font4` |
35
+ | macOS 10.14 (Mojave) | Font 5 | `macos-font5` |
36
+ | macOS 10.15 (Catalina) | Font 6 | `macos-font6` |
37
+ | macOS 11 (Big Sur) | Font 6 | `macos-font6` |
38
+ | macOS 12 (Monterey) | Font 7 | `macos-font7` |
39
+ | macOS 13 (Ventura) | Font 7 | `macos-font7` |
40
+ | macOS 14 (Sonoma) | Font 7 | `macos-font7` |
41
+ | macOS 15 (Sequoia) | Font 7 | `macos-font7` |
42
+ | macOS 26+ (Tahoe) | Font 8 | `macos-font8` |
43
+
44
+ ### How Versioning Works
45
+
46
+ A macOS system can only download fonts from the catalog version corresponding to its framework version. Fontist respects this limitation when installing these fonts.
47
+
48
+ When you install a macOS add-on font, Fontist automatically detects your macOS version and installs the appropriate font version:
49
+
50
+ ```sh
51
+ fontist install "Al Bayan"
52
+ # On macOS 15: installs Font7 version formula
53
+ # On macOS 26: installs Font8 version formula
54
+ ```
55
+
56
+ This ensures you always get the font version compatible with your system.
57
+
58
+ ---
59
+
60
+ ## Platform Tags
61
+
62
+ In Fontist Formulas, each supplementary font is backed by a formula specifying the font framework version using platform tags.
63
+
64
+ ### Tag Format
65
+
66
+ Platform tags follow the pattern: `macos-fontX` where `X` is the catalog version number.
67
+
68
+ ### Version Compatibility Checking
69
+
70
+ Fontist controls version compatibility through platform tags:
71
+
72
+ ```sh
73
+ # On macOS 14.2 (Sonoma), trying to install a Font8-only formula:
74
+ fontist install "Font8OnlyFont"
75
+
76
+ # Error output:
77
+ # Font 'Font8OnlyFont' is only available for: macos-font8.
78
+ # Your current platform is: macos. Your macOS version is: 14.2.1.
79
+ # This font requires macOS 26.0 or later.
80
+ # This font cannot be installed on your system.
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Manual Installation Methods
86
+
87
+ On macOS, supplementary fonts can also be installed manually:
88
+
89
+ ### Method 1: Application Trigger
90
+
91
+ User applications can trigger installation when needed, as described in Apple's ["DownloadFont" sample code](https://developer.apple.com/library/archive/samplecode/DownloadFont/Introduction/Intro.html).
92
+
93
+ ### Method 2: Font Book
94
+
95
+ 1. Open **Font Book.app**
96
+ 2. Search for the desired font
97
+ 3. Click "Download"
98
+
99
+ Both methods trigger a download from Apple's Mobile Asset Server.
100
+
101
+ ---
102
+
103
+ ## Asset Catalog Locations
104
+
105
+ The asset catalog XML files are located at:
106
+
107
+ | Version | System Path |
108
+ |---------|-------------|
109
+ | Font 3 | `/System/Library/Assets/com_apple_MobileAsset_Font3/com_apple_MobileAsset_Font3.xml` |
110
+ | Font 4 | `/System/Library/Assets/com_apple_MobileAsset_Font4/com_apple_MobileAsset_Font4.xml` |
111
+ | Font 5 | `/System/Library/AssetsV2/com_apple_MobileAsset_Font5/com_apple_MobileAsset_Font5.xml` |
112
+ | Font 6 | `/System/Library/AssetsV2/com_apple_MobileAsset_Font6/com_apple_MobileAsset_Font6.xml` |
113
+ | Font 7 | `/System/Library/AssetsV2/com_apple_MobileAsset_Font7/com_apple_MobileAsset_Font7.xml` |
114
+ | Font 8 | `/System/Library/AssetsV2/com_apple_MobileAsset_Font8/com_apple_MobileAsset_Font8.xml` |
115
+
116
+ ::: note Schema Differences
117
+ The Assets and AssetsV2 frameworks use slightly different Plist schemas.
118
+ :::
119
+
120
+ ---
121
+
122
+ ## Font Sources by macOS Version
123
+
124
+ For the complete list of available fonts on each macOS version, see Apple's support pages:
125
+
126
+ | macOS Version | Apple Support Link |
127
+ |---------------|-------------------|
128
+ | macOS 15 (Sequoia) | [Fonts included with macOS Sequoia](https://support.apple.com/en-us/120414) |
129
+ | macOS 14 (Sonoma) | [Fonts included with macOS Sonoma](https://support.apple.com/en-us/108939) |
130
+
131
+ ::: note Older macOS Versions
132
+ Apple may remove or relocate support articles for older macOS versions. For Ventura, Monterey, Big Sur, and earlier versions, use Font Book on your Mac to view available fonts, or search Apple Support for the specific version.
133
+ :::
134
+
135
+ ---
136
+
137
+ ## Example: Installing Canela
138
+
139
+ Canela is a commercial font that comes free with macOS:
140
+
141
+ ```sh
142
+ fontist install Canela
143
+ ```
144
+
145
+ ---
146
+
147
+ ## See Also
148
+
149
+ - [How Fontist Works](/guide/how-it-works) - Architecture and indexes
150
+ - [Formulas Guide](/guide/formulas) - How formulas work
151
+ - [Fontist Blog: Installing macOS-specific add-on fonts](https://www.fontist.org/blog/2022-02-11-macos-fonts)