fontist 2.1.3 → 2.1.5
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.
- checksums.yaml +4 -4
- data/.github/workflows/docs.yml +70 -0
- data/.github/workflows/links.yml +100 -0
- data/.gitignore +3 -1
- data/Gemfile +1 -0
- data/docs/.vitepress/config.ts +170 -32
- data/docs/.vitepress/data/cli-commands.json +461 -0
- data/docs/.vitepress/data/exit-codes.json +21 -0
- data/docs/.vitepress/data/features.json +44 -0
- data/docs/.vitepress/theme/components/HeroCodeBlock.vue +98 -0
- data/docs/.vitepress/theme/components/WithinHero.vue +30 -0
- data/docs/.vitepress/theme/index.ts +12 -0
- data/docs/.vitepress/theme/style.css +152 -0
- data/docs/api/errors.md +211 -0
- data/docs/api/font.md +101 -0
- data/docs/api/fontconfig.md +82 -0
- data/docs/api/formula.md +103 -0
- data/docs/api/index.md +49 -0
- data/docs/api/manifest.md +209 -0
- data/docs/cli/cache.md +100 -0
- data/docs/cli/config.md +123 -0
- data/docs/cli/create-formula.md +71 -0
- data/docs/cli/exit-codes.md +73 -0
- data/docs/cli/fontconfig.md +85 -0
- data/docs/cli/import.md +140 -0
- data/docs/cli/index-cmd.md +37 -0
- data/docs/cli/index.md +80 -0
- data/docs/cli/install.md +52 -0
- data/docs/cli/list.md +39 -0
- data/docs/cli/manifest.md +110 -0
- data/docs/cli/repo.md +142 -0
- data/docs/cli/status.md +39 -0
- data/docs/cli/uninstall.md +34 -0
- data/docs/cli/update.md +31 -0
- data/docs/cli/version.md +38 -0
- data/docs/components/CliCommand.vue +77 -0
- data/docs/components/CliExamples.vue +17 -0
- data/docs/components/CliOptions.vue +26 -0
- data/docs/components/ExitCodes.vue +18 -0
- data/docs/guide/ci.md +4 -0
- data/docs/guide/concepts/fonts.md +158 -0
- data/docs/guide/concepts/formats.md +234 -0
- data/docs/guide/concepts/index.md +109 -0
- data/docs/guide/concepts/licenses.md +236 -0
- data/docs/guide/concepts/requirements.md +388 -0
- data/docs/guide/concepts/variable-fonts.md +212 -0
- data/docs/guide/formulas.md +265 -0
- data/docs/guide/how-it-works.md +428 -0
- data/docs/guide/index.md +26 -47
- data/docs/guide/installation.md +167 -0
- data/docs/guide/maintainer/import.md +372 -0
- data/docs/guide/maintainer/index.md +37 -0
- data/docs/guide/manifests.md +132 -0
- data/docs/guide/platforms/index.md +72 -0
- data/docs/guide/platforms/macos.md +151 -0
- data/docs/guide/platforms/windows.md +220 -0
- data/docs/guide/quick-start.md +76 -0
- data/docs/guide/why.md +4 -0
- data/docs/index.md +55 -23
- data/docs/lychee.toml +33 -0
- data/docs/package-lock.json +9 -114
- data/docs/package.json +3 -5
- data/docs/public/apple-touch-icon.png +0 -0
- data/docs/public/favicon-96x96.png +0 -0
- data/docs/public/favicon.ico +0 -0
- data/docs/public/favicon.svg +1 -0
- data/docs/public/logo-full.svg +1 -0
- data/docs/public/logo.svg +1 -0
- data/docs/public/site.webmanifest +21 -0
- data/docs/public/web-app-manifest-192x192.png +0 -0
- data/docs/public/web-app-manifest-512x512.png +0 -0
- data/fontist.gemspec +0 -1
- data/lib/fontist/cache/manager.rb +0 -2
- data/lib/fontist/cache.rb +6 -0
- data/lib/fontist/cli/thor_ext.rb +0 -2
- data/lib/fontist/cli.rb +0 -10
- data/lib/fontist/collection_file.rb +0 -3
- data/lib/fontist/font.rb +0 -6
- data/lib/fontist/font_collection.rb +0 -1
- data/lib/fontist/font_file.rb +0 -1
- data/lib/fontist/font_installer.rb +0 -5
- data/lib/fontist/font_model.rb +0 -1
- data/lib/fontist/font_path.rb +0 -2
- data/lib/fontist/formula.rb +0 -13
- data/lib/fontist/formula_picker.rb +0 -2
- data/lib/fontist/google_import_source.rb +0 -2
- data/lib/fontist/import/convert_formulas.rb +0 -2
- data/lib/fontist/import/create_formula.rb +0 -4
- data/lib/fontist/import/files/collection_file.rb +0 -1
- data/lib/fontist/import/files.rb +8 -0
- data/lib/fontist/import/font_metadata_extractor.rb +0 -1
- data/lib/fontist/import/formula_builder.rb +0 -6
- data/lib/fontist/import/google/api.rb +0 -9
- data/lib/fontist/import/google/data_sources/base.rb +0 -1
- data/lib/fontist/import/google/data_sources/github.rb +0 -3
- data/lib/fontist/import/google/data_sources/ttf.rb +0 -2
- data/lib/fontist/import/google/data_sources/vf.rb +0 -2
- data/lib/fontist/import/google/data_sources/woff2.rb +0 -2
- data/lib/fontist/import/google/data_sources.rb +13 -0
- data/lib/fontist/import/google/font_database.rb +0 -10
- data/lib/fontist/import/google/metadata_adapter.rb +0 -1
- data/lib/fontist/import/google/models/font_family.rb +0 -1
- data/lib/fontist/import/google/models/metadata.rb +1 -9
- data/lib/fontist/import/google/models/source_metadata.rb +0 -1
- data/lib/fontist/import/google/models.rb +16 -0
- data/lib/fontist/import/google.rb +7 -2
- data/lib/fontist/import/google_fonts_importer.rb +0 -5
- data/lib/fontist/import/google_import.rb +1 -8
- data/lib/fontist/import/helpers.rb +8 -0
- data/lib/fontist/import/macos.rb +0 -6
- data/lib/fontist/import/manual_formula_builder.rb +0 -2
- data/lib/fontist/import/models.rb +7 -0
- data/lib/fontist/import/otf/font_file.rb +0 -2
- data/lib/fontist/import/otf.rb +7 -0
- data/lib/fontist/import/recursive_extraction.rb +0 -5
- data/lib/fontist/import/sil_import.rb +0 -3
- data/lib/fontist/import/upgrade_formulas.rb +1 -11
- data/lib/fontist/import.rb +23 -0
- data/lib/fontist/import_cli.rb +0 -9
- data/lib/fontist/index.rb +0 -4
- data/lib/fontist/index_cli.rb +0 -2
- data/lib/fontist/indexes/base_font_collection_index.rb +0 -1
- data/lib/fontist/indexes/default_family_font_index.rb +0 -2
- data/lib/fontist/indexes/directory_snapshot.rb +0 -2
- data/lib/fontist/indexes/filename_index.rb +0 -2
- data/lib/fontist/indexes/font_index.rb +0 -3
- data/lib/fontist/indexes/fontist_index.rb +0 -2
- data/lib/fontist/indexes/incremental_index_updater.rb +0 -4
- data/lib/fontist/indexes/preferred_family_font_index.rb +0 -2
- data/lib/fontist/indexes/system_index.rb +0 -2
- data/lib/fontist/indexes/user_index.rb +0 -2
- data/lib/fontist/indexes.rb +18 -0
- data/lib/fontist/install_location.rb +0 -4
- data/lib/fontist/install_locations/fontist_location.rb +0 -2
- data/lib/fontist/install_locations/system_location.rb +0 -2
- data/lib/fontist/install_locations/user_location.rb +0 -2
- data/lib/fontist/install_locations.rb +8 -0
- data/lib/fontist/macos/catalog/asset.rb +0 -2
- data/lib/fontist/macos/catalog/base_parser.rb +0 -1
- data/lib/fontist/macos/catalog/catalog_manager.rb +0 -6
- data/lib/fontist/macos/catalog/font3_parser.rb +0 -2
- data/lib/fontist/macos/catalog/font4_parser.rb +0 -2
- data/lib/fontist/macos/catalog/font5_parser.rb +0 -2
- data/lib/fontist/macos/catalog/font6_parser.rb +0 -2
- data/lib/fontist/macos/catalog/font7_parser.rb +0 -2
- data/lib/fontist/macos/catalog/font8_parser.rb +0 -2
- data/lib/fontist/macos/catalog.rb +15 -0
- data/lib/fontist/macos.rb +5 -0
- data/lib/fontist/macos_import_source.rb +0 -2
- data/lib/fontist/manifest_request.rb +0 -1
- data/lib/fontist/manifest_response.rb +0 -1
- data/lib/fontist/resources.rb +7 -0
- data/lib/fontist/sil_import_source.rb +0 -2
- data/lib/fontist/system_font.rb +0 -2
- data/lib/fontist/system_index.rb +0 -4
- data/lib/fontist/utils/cache.rb +0 -2
- data/lib/fontist/utils/downloader.rb +0 -4
- data/lib/fontist/utils.rb +10 -8
- data/lib/fontist/validate_cli.rb +0 -4
- data/lib/fontist/validator.rb +0 -2
- data/lib/fontist/version.rb +1 -1
- data/lib/fontist.rb +82 -36
- metadata +75 -22
- data/.github/workflows/deploy-pages.yml +0 -54
- data/.github/workflows/release.yml.orig +0 -36
- data/docs/guide/api-ruby.md +0 -189
- data/docs/public/hero.png +0 -0
- data/docs/public/logo.png +0 -0
- data/docs/reference/index.md +0 -143
|
@@ -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,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Manifests
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Manifests
|
|
6
|
+
|
|
7
|
+
Manifests are YAML files that define the fonts your project requires. They enable reproducible font installations across teams, machines, and CI/CD pipelines.
|
|
8
|
+
|
|
9
|
+
## Basic Format
|
|
10
|
+
|
|
11
|
+
A manifest is a simple YAML file listing font names:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
Fira Code:
|
|
15
|
+
Open Sans:
|
|
16
|
+
Roboto:
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Save this as `fonts.yml` and install all fonts with:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
fontist manifest install fonts.yml
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Specifying Styles
|
|
26
|
+
|
|
27
|
+
You can request specific font styles:
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
Roboto:
|
|
31
|
+
- Regular
|
|
32
|
+
- Bold
|
|
33
|
+
- Italic
|
|
34
|
+
|
|
35
|
+
Open Sans:
|
|
36
|
+
- Regular
|
|
37
|
+
- Bold
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If no styles are specified, Fontist installs all available styles for each font.
|
|
41
|
+
|
|
42
|
+
## Finding Font Names
|
|
43
|
+
|
|
44
|
+
To see available fonts and their exact names:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
fontist list
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Search for a specific font:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
fontist list "Roboto"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Getting Font Locations
|
|
57
|
+
|
|
58
|
+
After installing fonts from a manifest, you can get their file paths:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
fontist manifest locations fonts.yml
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Output is a YAML structure with paths:
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
---
|
|
68
|
+
Roboto:
|
|
69
|
+
Regular:
|
|
70
|
+
full_name: Roboto
|
|
71
|
+
paths:
|
|
72
|
+
- "/home/user/.fontist/fonts/Roboto-Regular.ttf"
|
|
73
|
+
Bold:
|
|
74
|
+
full_name: Roboto Bold
|
|
75
|
+
paths:
|
|
76
|
+
- "/home/user/.fontist/fonts/Roboto-Bold.ttf"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This output can be parsed by scripts or used directly in applications.
|
|
80
|
+
|
|
81
|
+
## Use Cases
|
|
82
|
+
|
|
83
|
+
### CI/CD Pipelines
|
|
84
|
+
|
|
85
|
+
Define project fonts in a manifest for reproducible builds:
|
|
86
|
+
|
|
87
|
+
```yaml
|
|
88
|
+
# fonts.yml
|
|
89
|
+
Fira Code:
|
|
90
|
+
Source Sans Pro:
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
# .github/workflows/build.yml
|
|
95
|
+
steps:
|
|
96
|
+
- uses: actions/checkout@v4
|
|
97
|
+
- uses: fontist/setup@v1
|
|
98
|
+
- run: fontist manifest install fonts.yml --accept-all-licenses --hide-licenses
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Team Projects
|
|
102
|
+
|
|
103
|
+
Commit `fonts.yml` to your repository so all team members use the same fonts:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
# Project fonts - install with: fontist manifest install fonts.yml
|
|
107
|
+
Merriweather:
|
|
108
|
+
- Regular
|
|
109
|
+
- Bold
|
|
110
|
+
Inter:
|
|
111
|
+
- Regular
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Documentation
|
|
115
|
+
|
|
116
|
+
Manifests serve as self-documenting font requirements. Anyone joining the project can see exactly which fonts are needed.
|
|
117
|
+
|
|
118
|
+
## CI Options
|
|
119
|
+
|
|
120
|
+
For automated environments, use these flags:
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
fontist manifest install fonts.yml --accept-all-licenses --hide-licenses
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- `--accept-all-licenses` - Skip license prompts
|
|
127
|
+
- `--hide-licenses` - Don't display license text
|
|
128
|
+
|
|
129
|
+
## Related
|
|
130
|
+
|
|
131
|
+
- [fontist manifest CLI reference](/cli/manifest) - Complete command documentation
|
|
132
|
+
- [CI/CD Integration guide](/guide/ci) - Setting up Fontist in CI
|
|
@@ -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.
|