fontist 2.1.3 → 2.1.4
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 +2 -1
- data/docs/.vitepress/config.ts +153 -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 +65 -0
- data/docs/cli/exit-codes.md +73 -0
- data/docs/cli/fontconfig.md +85 -0
- data/docs/cli/import.md +136 -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 +192 -0
- data/docs/guide/how-it-works.md +428 -0
- data/docs/guide/index.md +26 -47
- data/docs/guide/installation.md +105 -0
- data/docs/guide/manifests.md +132 -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/lib/fontist/cli.rb +0 -1
- data/lib/fontist/version.rb +1 -1
- metadata +58 -8
- 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,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Fontist::Manifest
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Fontist::Manifest
|
|
6
|
+
|
|
7
|
+
The `Fontist::Manifest` interface allows you to work with multiple fonts at once using a manifest format.
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Manifests are useful when you need to:
|
|
12
|
+
- Find locations of multiple fonts in one operation
|
|
13
|
+
- Install multiple fonts from a single definition
|
|
14
|
+
- Integrate with build systems or configuration files
|
|
15
|
+
|
|
16
|
+
## Global Options
|
|
17
|
+
|
|
18
|
+
Fontist can be switched to use preferred family names. This format was used prior to v1.10.
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
Fontist.preferred_family = true
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Manifest Format
|
|
25
|
+
|
|
26
|
+
The manifest format is a Hash (or YAML) with font names as keys and an array of styles as values:
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
{
|
|
30
|
+
"Segoe UI" => ["Regular", "Bold"],
|
|
31
|
+
"Roboto Mono" => ["Regular"]
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Class Methods
|
|
36
|
+
|
|
37
|
+
### `.from_yaml(yaml_string)`
|
|
38
|
+
|
|
39
|
+
Create a manifest from a YAML string.
|
|
40
|
+
|
|
41
|
+
**Parameters:**
|
|
42
|
+
|
|
43
|
+
| Param | Type | Description |
|
|
44
|
+
|-------|------|-------------|
|
|
45
|
+
| `yaml_string` | String | YAML formatted manifest content |
|
|
46
|
+
|
|
47
|
+
**Returns:** `Fontist::Manifest` — Manifest object
|
|
48
|
+
|
|
49
|
+
**Example:**
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
yaml = <<~YAML
|
|
53
|
+
Segoe UI:
|
|
54
|
+
- Regular
|
|
55
|
+
- Bold
|
|
56
|
+
Roboto Mono:
|
|
57
|
+
- Regular
|
|
58
|
+
YAML
|
|
59
|
+
|
|
60
|
+
manifest = Fontist::Manifest.from_yaml(yaml)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### `.from_hash(hash)`
|
|
66
|
+
|
|
67
|
+
Create a manifest from a Hash.
|
|
68
|
+
|
|
69
|
+
**Parameters:**
|
|
70
|
+
|
|
71
|
+
| Param | Type | Description |
|
|
72
|
+
|-------|------|-------------|
|
|
73
|
+
| `hash` | Hash | Manifest hash with font names and styles |
|
|
74
|
+
|
|
75
|
+
**Returns:** `Fontist::Manifest` — Manifest object
|
|
76
|
+
|
|
77
|
+
**Example:**
|
|
78
|
+
|
|
79
|
+
```ruby
|
|
80
|
+
manifest = Fontist::Manifest.from_hash({
|
|
81
|
+
"Segoe UI" => ["Regular", "Bold"],
|
|
82
|
+
"Roboto Mono" => ["Regular"]
|
|
83
|
+
})
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### `.from_file(path)`
|
|
89
|
+
|
|
90
|
+
Create a manifest from a YAML file.
|
|
91
|
+
|
|
92
|
+
**Parameters:**
|
|
93
|
+
|
|
94
|
+
| Param | Type | Description |
|
|
95
|
+
|-------|------|-------------|
|
|
96
|
+
| `path` | String | Path to the YAML manifest file |
|
|
97
|
+
|
|
98
|
+
**Returns:** `Fontist::Manifest` — Manifest object
|
|
99
|
+
|
|
100
|
+
**Example:**
|
|
101
|
+
|
|
102
|
+
Given a `manifest.yml` file:
|
|
103
|
+
|
|
104
|
+
```yaml
|
|
105
|
+
---
|
|
106
|
+
Segoe UI:
|
|
107
|
+
- Regular
|
|
108
|
+
- Bold
|
|
109
|
+
Roboto Mono:
|
|
110
|
+
- Regular
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```ruby
|
|
114
|
+
manifest = Fontist::Manifest.from_file("manifest.yml")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Instance Methods
|
|
118
|
+
|
|
119
|
+
### `.locations`
|
|
120
|
+
|
|
121
|
+
Get font locations from the manifest.
|
|
122
|
+
|
|
123
|
+
**Returns:** `Hash` — Nested hash with font paths and names
|
|
124
|
+
|
|
125
|
+
**Example:**
|
|
126
|
+
|
|
127
|
+
```ruby
|
|
128
|
+
manifest = Fontist::Manifest.from_hash({
|
|
129
|
+
"Segoe UI" => ["Regular", "Bold"]
|
|
130
|
+
})
|
|
131
|
+
locations = manifest.locations
|
|
132
|
+
|
|
133
|
+
# Returns:
|
|
134
|
+
# {
|
|
135
|
+
# "Segoe UI" => {
|
|
136
|
+
# "Regular" => {
|
|
137
|
+
# "full_name" => "Segoe UI",
|
|
138
|
+
# "paths" => ["/Users/user/.fontist/fonts/SEGOEUI.TTF"]
|
|
139
|
+
# },
|
|
140
|
+
# "Bold" => {
|
|
141
|
+
# "full_name" => "Segoe UI Bold",
|
|
142
|
+
# "paths" => ["/Users/user/.fontist/fonts/SEGOEUIB.TTF"]
|
|
143
|
+
# }
|
|
144
|
+
# }
|
|
145
|
+
# }
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### `.install(confirmation: "no")`
|
|
151
|
+
|
|
152
|
+
Install fonts from the manifest and return their locations.
|
|
153
|
+
|
|
154
|
+
**Parameters:**
|
|
155
|
+
|
|
156
|
+
| Param | Type | Description |
|
|
157
|
+
|-------|------|-------------|
|
|
158
|
+
| `confirmation` | String | License confirmation, use `"yes"` to accept license |
|
|
159
|
+
|
|
160
|
+
**Returns:** `Hash` — Nested hash with font paths and names
|
|
161
|
+
|
|
162
|
+
**Example:**
|
|
163
|
+
|
|
164
|
+
```ruby
|
|
165
|
+
manifest = Fontist::Manifest.from_file("manifest.yml")
|
|
166
|
+
locations = manifest.install(confirmation: "yes")
|
|
167
|
+
|
|
168
|
+
# Returns installed font locations:
|
|
169
|
+
# {
|
|
170
|
+
# "Segoe UI" => {
|
|
171
|
+
# "Regular" => {
|
|
172
|
+
# "full_name" => "Segoe UI",
|
|
173
|
+
# "paths" => ["/Users/user/.fontist/fonts/SEGOEUI.TTF"]
|
|
174
|
+
# },
|
|
175
|
+
# "Bold" => {
|
|
176
|
+
# "full_name" => "Segoe UI Bold",
|
|
177
|
+
# "paths" => ["/Users/user/.fontist/fonts/SEGOEUIB.TTF"]
|
|
178
|
+
# }
|
|
179
|
+
# },
|
|
180
|
+
# "Roboto Mono" => {
|
|
181
|
+
# "Regular" => {
|
|
182
|
+
# "full_name" => "Roboto Mono Regular",
|
|
183
|
+
# "paths" => ["/Users/user/.fontist/fonts/RobotoMono-VariableFont_wght.ttf"]
|
|
184
|
+
# }
|
|
185
|
+
# }
|
|
186
|
+
# }
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Return Value Structure
|
|
190
|
+
|
|
191
|
+
The return value from `locations` or `install` is a nested Hash:
|
|
192
|
+
|
|
193
|
+
```ruby
|
|
194
|
+
{
|
|
195
|
+
"Font Name" => {
|
|
196
|
+
"Style Name" => {
|
|
197
|
+
"full_name" => "Full Font Name", # String or nil if not found
|
|
198
|
+
"paths" => ["/path/to/font.ttf"] # Array of paths, empty if not found
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The `full_name` field is useful to choose a specific font in a font collection file (TTC).
|
|
205
|
+
|
|
206
|
+
## See Also
|
|
207
|
+
|
|
208
|
+
- [Fontist::Font](/api/font) — Individual font installation
|
|
209
|
+
- [Fontist::Formula](/api/formula) — Formula information
|
data/docs/cli/cache.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# fontist cache
|
|
2
|
+
|
|
3
|
+
Manage Fontist cache directories.
|
|
4
|
+
|
|
5
|
+
## Subcommands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| [`fontist cache clear`](#cache-clear) | Clear font download cache |
|
|
10
|
+
| [`fontist cache clear-import`](#cache-clear-import) | Clear import cache |
|
|
11
|
+
| [`fontist cache info`](#cache-info) | Show cache information |
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## cache clear
|
|
16
|
+
|
|
17
|
+
Clear the font download cache.
|
|
18
|
+
|
|
19
|
+
### Syntax
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
fontist cache clear
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Description
|
|
26
|
+
|
|
27
|
+
Removes:
|
|
28
|
+
- Downloaded font archives
|
|
29
|
+
- System font indexes
|
|
30
|
+
|
|
31
|
+
This does not remove installed fonts, only cached downloads.
|
|
32
|
+
|
|
33
|
+
### Examples
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
fontist cache clear
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## cache clear-import
|
|
42
|
+
|
|
43
|
+
Clear the import cache used during formula creation.
|
|
44
|
+
|
|
45
|
+
### Syntax
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
fontist cache clear-import [options]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Options
|
|
52
|
+
|
|
53
|
+
| Option | Alias | Type | Description |
|
|
54
|
+
|--------|-------|------|-------------|
|
|
55
|
+
| `--verbose` | `-v` | boolean | Show detailed output |
|
|
56
|
+
|
|
57
|
+
### Examples
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
fontist cache clear-import
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## cache info
|
|
66
|
+
|
|
67
|
+
Show cache information including sizes and file counts.
|
|
68
|
+
|
|
69
|
+
### Syntax
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
fontist cache info
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Output
|
|
76
|
+
|
|
77
|
+
- Font download cache location and size
|
|
78
|
+
- Import cache location and size
|
|
79
|
+
- File counts for each cache
|
|
80
|
+
|
|
81
|
+
### Examples
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
fontist cache info
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Cache Locations
|
|
90
|
+
|
|
91
|
+
| Cache | Default Location |
|
|
92
|
+
|-------|-------------------|
|
|
93
|
+
| Font downloads | `~/.fontist/downloads` |
|
|
94
|
+
| Import cache | `~/.fontist/import_cache` |
|
|
95
|
+
|
|
96
|
+
## When to Clear Cache
|
|
97
|
+
|
|
98
|
+
- **Free disk space**: Cache can grow large with many font downloads
|
|
99
|
+
- **Corrupted downloads**: If a download was interrupted or corrupted
|
|
100
|
+
- **After import operations**: Clear import cache after creating formulas
|
data/docs/cli/config.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# fontist config
|
|
2
|
+
|
|
3
|
+
Manage Fontist configuration settings.
|
|
4
|
+
|
|
5
|
+
## Subcommands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| [`fontist config show`](#config-show) | Show current configuration |
|
|
10
|
+
| [`fontist config set`](#config-set) | Set a configuration value |
|
|
11
|
+
| [`fontist config delete`](#config-delete) | Delete a configuration key |
|
|
12
|
+
| [`fontist config keys`](#config-keys) | List available configuration keys |
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## config show
|
|
17
|
+
|
|
18
|
+
Show values of the current configuration.
|
|
19
|
+
|
|
20
|
+
### Syntax
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
fontist config show
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Examples
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
fontist config show
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## config set
|
|
35
|
+
|
|
36
|
+
Set a configuration key to a value.
|
|
37
|
+
|
|
38
|
+
### Syntax
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
fontist config set KEY VALUE
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Arguments
|
|
45
|
+
|
|
46
|
+
| Name | Required | Description |
|
|
47
|
+
|------|----------|-------------|
|
|
48
|
+
| `KEY` | Yes | Configuration key name |
|
|
49
|
+
| `VALUE` | Yes | Value to set |
|
|
50
|
+
|
|
51
|
+
### Examples
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
# Set custom fonts path
|
|
55
|
+
fontist config set fonts_path /var/myfonts
|
|
56
|
+
|
|
57
|
+
# Set timeout
|
|
58
|
+
fontist config set open_timeout 120
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## config delete
|
|
64
|
+
|
|
65
|
+
Delete a configuration key (resets to default).
|
|
66
|
+
|
|
67
|
+
### Syntax
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
fontist config delete KEY
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Arguments
|
|
74
|
+
|
|
75
|
+
| Name | Required | Description |
|
|
76
|
+
|------|----------|-------------|
|
|
77
|
+
| `KEY` | Yes | Configuration key to delete |
|
|
78
|
+
|
|
79
|
+
### Examples
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
fontist config delete fonts_path
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## config keys
|
|
88
|
+
|
|
89
|
+
List all available configuration keys with their default values.
|
|
90
|
+
|
|
91
|
+
### Syntax
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
fontist config keys
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Examples
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
fontist config keys
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Output:
|
|
104
|
+
```
|
|
105
|
+
Available keys:
|
|
106
|
+
fonts_path (default: /home/user/.fontist/fonts)
|
|
107
|
+
open_timeout (default: 60)
|
|
108
|
+
read_timeout (default: 60)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Available Configuration Keys
|
|
114
|
+
|
|
115
|
+
| Key | Default | Description |
|
|
116
|
+
|-----|---------|-------------|
|
|
117
|
+
| `fonts_path` | `~/.fontist/fonts` | Where Fontist installs fonts |
|
|
118
|
+
| `open_timeout` | 60 | HTTP open timeout in seconds |
|
|
119
|
+
| `read_timeout` | 60 | HTTP read timeout in seconds |
|
|
120
|
+
|
|
121
|
+
## Configuration File
|
|
122
|
+
|
|
123
|
+
Configuration is stored in `~/.fontist/config.yml`.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# fontist create-formula
|
|
2
|
+
|
|
3
|
+
Create a new Fontist formula from a font download URL.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
fontist create-formula URL [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
|
|
13
|
+
| Name | Required | Description |
|
|
14
|
+
|------|----------|-------------|
|
|
15
|
+
| `URL` | Yes | URL to download fonts from |
|
|
16
|
+
|
|
17
|
+
## Options
|
|
18
|
+
|
|
19
|
+
| Option | Type | Description |
|
|
20
|
+
|--------|------|-------------|
|
|
21
|
+
| `--name` | string | Font name (e.g., "Times New Roman") |
|
|
22
|
+
| `--mirror` | array | Mirror URLs (can be repeated) |
|
|
23
|
+
| `--subdir` | string | Subdirectory to extract fonts from |
|
|
24
|
+
| `--file-pattern` | string | File pattern to match (e.g., "*.otf") |
|
|
25
|
+
| `--name-prefix` | string | Prefix for font family names |
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
# Create formula from a font archive
|
|
31
|
+
fontist create-formula https://example.com/fonts/myfont.zip
|
|
32
|
+
|
|
33
|
+
# Specify font name
|
|
34
|
+
fontist create-formula https://example.com/fonts/myfont.zip --name "My Font"
|
|
35
|
+
|
|
36
|
+
# Use subdirectory
|
|
37
|
+
fontist create-formula https://example.com/fonts/myfont.zip --subdir "fonts/otf"
|
|
38
|
+
|
|
39
|
+
# Filter by file pattern
|
|
40
|
+
fontist create-formula https://example.com/fonts/myfont.zip --file-pattern "*.otf"
|
|
41
|
+
|
|
42
|
+
# Add mirror URLs
|
|
43
|
+
fontist create-formula https://example.com/fonts/myfont.zip --mirror https://mirror.example.com/fonts/myfont.zip
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## How It Works
|
|
47
|
+
|
|
48
|
+
1. Downloads the font archive from the URL
|
|
49
|
+
2. Extracts and analyzes font files
|
|
50
|
+
3. Detects font names, styles, and metadata
|
|
51
|
+
4. Generates a formula YAML file
|
|
52
|
+
|
|
53
|
+
## Generated Formula
|
|
54
|
+
|
|
55
|
+
The formula is saved to `./Formulas/` directory with a filename based on the font name.
|
|
56
|
+
|
|
57
|
+
## Use Cases
|
|
58
|
+
|
|
59
|
+
- **New fonts**: Create formulas for fonts not in Fontist
|
|
60
|
+
- **Private fonts**: Create formulas for proprietary fonts
|
|
61
|
+
- **Contributing**: Prepare formulas for submission to Fontist
|
|
62
|
+
|
|
63
|
+
## Related
|
|
64
|
+
|
|
65
|
+
- [Create a Formula Guide](https://www.fontist.org/formulas/guide/create-formula) - Detailed formula creation guide
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Exit Codes
|
|
2
|
+
|
|
3
|
+
Fontist uses standard exit codes to indicate the result of command execution.
|
|
4
|
+
|
|
5
|
+
| Code | Name | Description |
|
|
6
|
+
|------|------|-------------|
|
|
7
|
+
| 0 | SUCCESS | Command completed successfully |
|
|
8
|
+
| 1 | UNKNOWN_ERROR | Unknown or unexpected error |
|
|
9
|
+
| 2 | NON_SUPPORTED_FONT_ERROR | Font is not supported by fontist |
|
|
10
|
+
| 3 | MISSING_FONT_ERROR | Font could not be found on the system or in formulas |
|
|
11
|
+
| 4 | LICENSING_ERROR | License agreement required but not accepted |
|
|
12
|
+
| 5 | MANIFEST_COULD_NOT_BE_FOUND_ERROR | Manifest file not found at specified path |
|
|
13
|
+
| 6 | MANIFEST_COULD_NOT_BE_READ_ERROR | Manifest file could not be read (invalid YAML or permissions) |
|
|
14
|
+
| 7 | FONT_INDEX_CORRUPTED | Font index file is corrupted and needs to be rebuilt |
|
|
15
|
+
| 8 | REPO_NOT_FOUND | Repository not found |
|
|
16
|
+
| 9 | MAIN_REPO_NOT_FOUND | Main formulas repository not found |
|
|
17
|
+
| 10 | REPO_COULD_NOT_BE_UPDATED | Repository could not be updated (network or git error) |
|
|
18
|
+
| 11 | MANUAL_FONT_ERROR | Manual font installation required (font cannot be downloaded) |
|
|
19
|
+
| 12 | SIZE_LIMIT_ERROR | Formula exceeds size limit. Use --size-limit, --newest, or --smallest options |
|
|
20
|
+
| 13 | FORMULA_NOT_FOUND | Formula not found for the requested font |
|
|
21
|
+
| 14 | FONTCONFIG_NOT_FOUND | Fontconfig is not installed or not found |
|
|
22
|
+
| 15 | FONTCONFIG_FILE_NOT_FOUND | Fontconfig configuration file not found |
|
|
23
|
+
| 16 | INVALID_CONFIG_ATTRIBUTE | Invalid configuration attribute specified |
|
|
24
|
+
|
|
25
|
+
## Using Exit Codes in Scripts
|
|
26
|
+
|
|
27
|
+
Exit codes are useful for scripting and CI/CD:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
#!/bin/bash
|
|
31
|
+
fontist install "Roboto"
|
|
32
|
+
if [ $? -eq 4 ]; then
|
|
33
|
+
echo "License acceptance required"
|
|
34
|
+
fontist install "Roboto" --accept-all-licenses
|
|
35
|
+
fi
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Common Patterns
|
|
39
|
+
|
|
40
|
+
### CI/CD Pipelines
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
# GitHub Actions example
|
|
44
|
+
- name: Install fonts
|
|
45
|
+
run: |
|
|
46
|
+
fontist install --accept-all-licenses --hide-licenses
|
|
47
|
+
# Check for missing fonts
|
|
48
|
+
if [ $? -eq 3 ]; then
|
|
49
|
+
echo "Some fonts not found"
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Error Handling
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
# Ruby script example
|
|
58
|
+
result = system("fontist install 'Roboto'")
|
|
59
|
+
case $?.exitstatus
|
|
60
|
+
when 0
|
|
61
|
+
puts "Success"
|
|
62
|
+
when 3
|
|
63
|
+
puts "Font not found"
|
|
64
|
+
when 4
|
|
65
|
+
puts "License needs acceptance"
|
|
66
|
+
else
|
|
67
|
+
puts "Unknown error"
|
|
68
|
+
end
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Related
|
|
72
|
+
|
|
73
|
+
- [CLI Reference](/cli/) - All CLI commands
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# fontist fontconfig
|
|
2
|
+
|
|
3
|
+
Manage fontconfig integration for Linux systems.
|
|
4
|
+
|
|
5
|
+
## Subcommands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| [`fontist fontconfig update`](#fontconfig-update) | Update fontconfig to use Fontist fonts |
|
|
10
|
+
| [`fontist fontconfig remove`](#fontconfig-remove) | Remove Fontist from fontconfig |
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## fontconfig update
|
|
15
|
+
|
|
16
|
+
Update fontconfig configuration to include Fontist-installed fonts.
|
|
17
|
+
|
|
18
|
+
### Syntax
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
fontist fontconfig update
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Description
|
|
25
|
+
|
|
26
|
+
Creates or updates a fontconfig configuration file that includes Fontist's font directory. This allows applications using fontconfig to discover and use fonts installed by Fontist.
|
|
27
|
+
|
|
28
|
+
### Examples
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
fontist fontconfig update
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Requirements
|
|
35
|
+
|
|
36
|
+
- Fontconfig must be installed on your system
|
|
37
|
+
- Typically used on Linux systems
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## fontconfig remove
|
|
42
|
+
|
|
43
|
+
Remove Fontist's fontconfig configuration.
|
|
44
|
+
|
|
45
|
+
### Syntax
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
fontist fontconfig remove [options]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Options
|
|
52
|
+
|
|
53
|
+
| Option | Alias | Type | Description |
|
|
54
|
+
|--------|-------|------|-------------|
|
|
55
|
+
| `--force` | `-f` | boolean | Proceed even if configuration file does not exist |
|
|
56
|
+
|
|
57
|
+
### Examples
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
# Remove fontconfig integration
|
|
61
|
+
fontist fontconfig remove
|
|
62
|
+
|
|
63
|
+
# Force removal
|
|
64
|
+
fontist fontconfig remove --force
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## How It Works
|
|
70
|
+
|
|
71
|
+
Fontist integrates with fontconfig by creating a configuration file at:
|
|
72
|
+
- `~/.config/fontconfig/99-fontist.conf` (or equivalent on your system)
|
|
73
|
+
|
|
74
|
+
This configuration adds Fontist's fonts directory to fontconfig's search path.
|
|
75
|
+
|
|
76
|
+
## When to Use
|
|
77
|
+
|
|
78
|
+
Use fontconfig integration when:
|
|
79
|
+
- Running Linux applications that rely on fontconfig
|
|
80
|
+
- Applications need to discover fonts through fontconfig rather than direct file paths
|
|
81
|
+
- Working with document rendering systems (LaTeX, etc.)
|
|
82
|
+
|
|
83
|
+
## Related
|
|
84
|
+
|
|
85
|
+
- [Fontist with Fontconfig guide](/guide/fontconfig) - Detailed integration guide
|