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
data/lib/fontist/version.rb
CHANGED
data/lib/fontist.rb
CHANGED
|
@@ -1,14 +1,95 @@
|
|
|
1
1
|
require "down"
|
|
2
2
|
require "digest"
|
|
3
3
|
require "singleton"
|
|
4
|
+
require "lutaml/model"
|
|
4
5
|
|
|
5
6
|
require_relative "fontist/errors"
|
|
6
7
|
require_relative "fontist/version"
|
|
7
|
-
require_relative "fontist/cache
|
|
8
|
+
require_relative "fontist/cache"
|
|
8
9
|
require_relative "fontist/memoizable"
|
|
9
10
|
require_relative "fontist/path_scanning"
|
|
11
|
+
require_relative "fontist/utils"
|
|
10
12
|
|
|
11
13
|
module Fontist
|
|
14
|
+
# Core classes
|
|
15
|
+
autoload :Config, "#{__dir__}/fontist/config"
|
|
16
|
+
autoload :Font, "#{__dir__}/fontist/font"
|
|
17
|
+
autoload :FontCollection, "#{__dir__}/fontist/font_collection"
|
|
18
|
+
autoload :FontFile, "#{__dir__}/fontist/font_file"
|
|
19
|
+
autoload :FontInstaller, "#{__dir__}/fontist/font_installer"
|
|
20
|
+
autoload :FontModel, "#{__dir__}/fontist/font_model"
|
|
21
|
+
autoload :FontPath, "#{__dir__}/fontist/font_path"
|
|
22
|
+
autoload :FontStyle, "#{__dir__}/fontist/font_style"
|
|
23
|
+
autoload :Fontconfig, "#{__dir__}/fontist/fontconfig"
|
|
24
|
+
autoload :Formula, "#{__dir__}/fontist/formula"
|
|
25
|
+
autoload :FormulaCollection, "#{__dir__}/fontist/formula"
|
|
26
|
+
autoload :FormulaPicker, "#{__dir__}/fontist/formula_picker"
|
|
27
|
+
autoload :FormulaSuggestion, "#{__dir__}/fontist/formula_suggestion"
|
|
28
|
+
autoload :Helpers, "#{__dir__}/fontist/helpers"
|
|
29
|
+
autoload :Import, "#{__dir__}/fontist/import"
|
|
30
|
+
autoload :ImportSource, "#{__dir__}/fontist/import_source"
|
|
31
|
+
autoload :InstallLocation, "#{__dir__}/fontist/install_location"
|
|
32
|
+
autoload :StyleVersion, "#{__dir__}/fontist/style_version"
|
|
33
|
+
autoload :Update, "#{__dir__}/fontist/update"
|
|
34
|
+
|
|
35
|
+
# Index classes
|
|
36
|
+
autoload :Index, "#{__dir__}/fontist/index"
|
|
37
|
+
autoload :IndexEntry, "#{__dir__}/fontist/index"
|
|
38
|
+
autoload :IndexStats, "#{__dir__}/fontist/system_index"
|
|
39
|
+
autoload :SystemIndexFont, "#{__dir__}/fontist/system_index"
|
|
40
|
+
autoload :SystemIndexFontCollection, "#{__dir__}/fontist/system_index"
|
|
41
|
+
autoload :SystemIndex, "#{__dir__}/fontist/system_index"
|
|
42
|
+
|
|
43
|
+
# Data models
|
|
44
|
+
autoload :CollectionFile, "#{__dir__}/fontist/collection_file"
|
|
45
|
+
autoload :Extract, "#{__dir__}/fontist/extract"
|
|
46
|
+
autoload :ExtractOptions, "#{__dir__}/fontist/extract"
|
|
47
|
+
autoload :Resource, "#{__dir__}/fontist/formula"
|
|
48
|
+
autoload :ResourceCollection, "#{__dir__}/fontist/formula"
|
|
49
|
+
|
|
50
|
+
# Font sources
|
|
51
|
+
autoload :GoogleImportSource, "#{__dir__}/fontist/google_import_source"
|
|
52
|
+
autoload :MacosImportSource, "#{__dir__}/fontist/macos_import_source"
|
|
53
|
+
autoload :SilImportSource, "#{__dir__}/fontist/sil_import_source"
|
|
54
|
+
autoload :MacosFrameworkMetadata, "#{__dir__}/fontist/macos_framework_metadata"
|
|
55
|
+
|
|
56
|
+
# Manifest classes
|
|
57
|
+
autoload :Manifest, "#{__dir__}/fontist/manifest"
|
|
58
|
+
autoload :ManifestFont, "#{__dir__}/fontist/manifest"
|
|
59
|
+
autoload :ManifestRequest, "#{__dir__}/fontist/manifest_request"
|
|
60
|
+
autoload :ManifestRequestFont, "#{__dir__}/fontist/manifest_request"
|
|
61
|
+
autoload :ManifestResponse, "#{__dir__}/fontist/manifest_response"
|
|
62
|
+
autoload :ManifestResponseFont, "#{__dir__}/fontist/manifest_response"
|
|
63
|
+
autoload :ManifestResponseFontStyle, "#{__dir__}/fontist/manifest_response"
|
|
64
|
+
|
|
65
|
+
# System
|
|
66
|
+
autoload :Info, "#{__dir__}/fontist/repo"
|
|
67
|
+
autoload :Repo, "#{__dir__}/fontist/repo"
|
|
68
|
+
autoload :SystemFont, "#{__dir__}/fontist/system_font"
|
|
69
|
+
|
|
70
|
+
# CLI
|
|
71
|
+
autoload :CLI, "#{__dir__}/fontist/cli"
|
|
72
|
+
autoload :CacheCLI, "#{__dir__}/fontist/cache_cli"
|
|
73
|
+
autoload :ConfigCLI, "#{__dir__}/fontist/config_cli"
|
|
74
|
+
autoload :FontconfigCLI, "#{__dir__}/fontist/fontconfig_cli"
|
|
75
|
+
autoload :ImportCLI, "#{__dir__}/fontist/import_cli"
|
|
76
|
+
autoload :IndexCLI, "#{__dir__}/fontist/index_cli"
|
|
77
|
+
autoload :ManifestCLI, "#{__dir__}/fontist/manifest_cli"
|
|
78
|
+
autoload :RepoCLI, "#{__dir__}/fontist/repo_cli"
|
|
79
|
+
autoload :ThorExt, "#{__dir__}/fontist/cli/thor_ext"
|
|
80
|
+
autoload :Validation, "#{__dir__}/fontist/validation"
|
|
81
|
+
autoload :ValidationReport, "#{__dir__}/fontist/validation"
|
|
82
|
+
autoload :ValidationCache, "#{__dir__}/fontist/validation"
|
|
83
|
+
autoload :FontValidationResult, "#{__dir__}/fontist/validation"
|
|
84
|
+
autoload :Validator, "#{__dir__}/fontist/validator"
|
|
85
|
+
autoload :ValidateCLI, "#{__dir__}/fontist/validate_cli"
|
|
86
|
+
|
|
87
|
+
# Namespace modules
|
|
88
|
+
autoload :Indexes, "#{__dir__}/fontist/indexes"
|
|
89
|
+
autoload :InstallLocations, "#{__dir__}/fontist/install_locations"
|
|
90
|
+
autoload :Resources, "#{__dir__}/fontist/resources"
|
|
91
|
+
autoload :Macos, "#{__dir__}/fontist/macos"
|
|
92
|
+
|
|
12
93
|
def self.ui
|
|
13
94
|
Fontist::Utils::UI
|
|
14
95
|
end
|
|
@@ -196,38 +277,3 @@ module Fontist
|
|
|
196
277
|
true
|
|
197
278
|
end
|
|
198
279
|
end
|
|
199
|
-
|
|
200
|
-
require_relative "fontist/repo"
|
|
201
|
-
require_relative "fontist/font"
|
|
202
|
-
require_relative "fontist/formula"
|
|
203
|
-
require_relative "fontist/system_font"
|
|
204
|
-
require_relative "fontist/manifest"
|
|
205
|
-
require_relative "fontist/manifest_response"
|
|
206
|
-
require_relative "fontist/manifest_request"
|
|
207
|
-
require_relative "fontist/helpers"
|
|
208
|
-
require_relative "fontist/config"
|
|
209
|
-
require_relative "fontist/update"
|
|
210
|
-
require_relative "fontist/index"
|
|
211
|
-
require_relative "fontist/indexes/incremental_scanner"
|
|
212
|
-
require_relative "fontist/indexes/directory_snapshot"
|
|
213
|
-
require_relative "fontist/indexes/directory_change"
|
|
214
|
-
require_relative "fontist/indexes/incremental_index_updater"
|
|
215
|
-
require_relative "fontist/indexes/font_index"
|
|
216
|
-
require_relative "fontist/indexes/filename_index"
|
|
217
|
-
require_relative "fontist/indexes/fontist_index"
|
|
218
|
-
require_relative "fontist/indexes/user_index"
|
|
219
|
-
require_relative "fontist/indexes/system_index"
|
|
220
|
-
require_relative "fontist/cli"
|
|
221
|
-
require_relative "fontist/font_installer"
|
|
222
|
-
require_relative "fontist/fontconfig"
|
|
223
|
-
require_relative "fontist/formula_picker"
|
|
224
|
-
require_relative "fontist/formula_suggestion"
|
|
225
|
-
require_relative "fontist/extract"
|
|
226
|
-
require_relative "fontist/font_style"
|
|
227
|
-
require_relative "fontist/font_collection"
|
|
228
|
-
require_relative "fontist/import"
|
|
229
|
-
require_relative "fontist/import_source"
|
|
230
|
-
require_relative "fontist/macos_import_source"
|
|
231
|
-
require_relative "fontist/google_import_source"
|
|
232
|
-
require_relative "fontist/sil_import_source"
|
|
233
|
-
require_relative "fontist/macos_framework_metadata"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fontist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: down
|
|
@@ -120,20 +120,6 @@ dependencies:
|
|
|
120
120
|
- - "~>"
|
|
121
121
|
- !ruby/object:Gem::Version
|
|
122
122
|
version: '0.7'
|
|
123
|
-
- !ruby/object:Gem::Dependency
|
|
124
|
-
name: lutaml-xsd
|
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
|
126
|
-
requirements:
|
|
127
|
-
- - "~>"
|
|
128
|
-
- !ruby/object:Gem::Version
|
|
129
|
-
version: '1.0'
|
|
130
|
-
type: :runtime
|
|
131
|
-
prerelease: false
|
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
133
|
-
requirements:
|
|
134
|
-
- - "~>"
|
|
135
|
-
- !ruby/object:Gem::Version
|
|
136
|
-
version: '1.0'
|
|
137
123
|
- !ruby/object:Gem::Dependency
|
|
138
124
|
name: marcel
|
|
139
125
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -268,14 +254,14 @@ executables:
|
|
|
268
254
|
extensions: []
|
|
269
255
|
extra_rdoc_files: []
|
|
270
256
|
files:
|
|
271
|
-
- ".github/workflows/deploy-pages.yml"
|
|
272
257
|
- ".github/workflows/discover-fonts.yml"
|
|
258
|
+
- ".github/workflows/docs.yml"
|
|
273
259
|
- ".github/workflows/formulas-auto-update-test.yml"
|
|
260
|
+
- ".github/workflows/links.yml"
|
|
274
261
|
- ".github/workflows/post-rake.yml"
|
|
275
262
|
- ".github/workflows/rake-metanorma.yaml"
|
|
276
263
|
- ".github/workflows/rake.yml"
|
|
277
264
|
- ".github/workflows/release.yml"
|
|
278
|
-
- ".github/workflows/release.yml.orig"
|
|
279
265
|
- ".github/workflows/tebako-pack.yml"
|
|
280
266
|
- ".gitignore"
|
|
281
267
|
- ".gitmodules"
|
|
@@ -289,24 +275,80 @@ files:
|
|
|
289
275
|
- Rakefile
|
|
290
276
|
- docs/.gitignore
|
|
291
277
|
- docs/.vitepress/config.ts
|
|
292
|
-
- docs/
|
|
278
|
+
- docs/.vitepress/data/cli-commands.json
|
|
279
|
+
- docs/.vitepress/data/exit-codes.json
|
|
280
|
+
- docs/.vitepress/data/features.json
|
|
281
|
+
- docs/.vitepress/theme/components/HeroCodeBlock.vue
|
|
282
|
+
- docs/.vitepress/theme/components/WithinHero.vue
|
|
283
|
+
- docs/.vitepress/theme/index.ts
|
|
284
|
+
- docs/.vitepress/theme/style.css
|
|
285
|
+
- docs/api/errors.md
|
|
286
|
+
- docs/api/font.md
|
|
287
|
+
- docs/api/fontconfig.md
|
|
288
|
+
- docs/api/formula.md
|
|
289
|
+
- docs/api/index.md
|
|
290
|
+
- docs/api/manifest.md
|
|
291
|
+
- docs/cli/cache.md
|
|
292
|
+
- docs/cli/config.md
|
|
293
|
+
- docs/cli/create-formula.md
|
|
294
|
+
- docs/cli/exit-codes.md
|
|
295
|
+
- docs/cli/fontconfig.md
|
|
296
|
+
- docs/cli/import.md
|
|
297
|
+
- docs/cli/index-cmd.md
|
|
298
|
+
- docs/cli/index.md
|
|
299
|
+
- docs/cli/install.md
|
|
300
|
+
- docs/cli/list.md
|
|
301
|
+
- docs/cli/manifest.md
|
|
302
|
+
- docs/cli/repo.md
|
|
303
|
+
- docs/cli/status.md
|
|
304
|
+
- docs/cli/uninstall.md
|
|
305
|
+
- docs/cli/update.md
|
|
306
|
+
- docs/cli/version.md
|
|
307
|
+
- docs/components/CliCommand.vue
|
|
308
|
+
- docs/components/CliExamples.vue
|
|
309
|
+
- docs/components/CliOptions.vue
|
|
310
|
+
- docs/components/ExitCodes.vue
|
|
293
311
|
- docs/guide/ci.md
|
|
312
|
+
- docs/guide/concepts/fonts.md
|
|
313
|
+
- docs/guide/concepts/formats.md
|
|
314
|
+
- docs/guide/concepts/index.md
|
|
315
|
+
- docs/guide/concepts/licenses.md
|
|
316
|
+
- docs/guide/concepts/requirements.md
|
|
317
|
+
- docs/guide/concepts/variable-fonts.md
|
|
294
318
|
- docs/guide/fontconfig.md
|
|
319
|
+
- docs/guide/formulas.md
|
|
320
|
+
- docs/guide/how-it-works.md
|
|
295
321
|
- docs/guide/index.md
|
|
322
|
+
- docs/guide/installation.md
|
|
323
|
+
- docs/guide/maintainer/import.md
|
|
324
|
+
- docs/guide/maintainer/index.md
|
|
325
|
+
- docs/guide/manifests.md
|
|
326
|
+
- docs/guide/platforms/index.md
|
|
327
|
+
- docs/guide/platforms/macos.md
|
|
328
|
+
- docs/guide/platforms/windows.md
|
|
296
329
|
- docs/guide/proxy.md
|
|
330
|
+
- docs/guide/quick-start.md
|
|
297
331
|
- docs/guide/why.md
|
|
298
332
|
- docs/index.md
|
|
333
|
+
- docs/lychee.toml
|
|
299
334
|
- docs/package-lock.json
|
|
300
335
|
- docs/package.json
|
|
301
|
-
- docs/public/
|
|
302
|
-
- docs/public/
|
|
303
|
-
- docs/
|
|
336
|
+
- docs/public/apple-touch-icon.png
|
|
337
|
+
- docs/public/favicon-96x96.png
|
|
338
|
+
- docs/public/favicon.ico
|
|
339
|
+
- docs/public/favicon.svg
|
|
340
|
+
- docs/public/logo-full.svg
|
|
341
|
+
- docs/public/logo.svg
|
|
342
|
+
- docs/public/site.webmanifest
|
|
343
|
+
- docs/public/web-app-manifest-192x192.png
|
|
344
|
+
- docs/public/web-app-manifest-512x512.png
|
|
304
345
|
- exe/fontist
|
|
305
346
|
- fontist.gemspec
|
|
306
347
|
- formula_filename_index.yml
|
|
307
348
|
- formula_index.yml
|
|
308
349
|
- google-fonts-multi-format-usage.md
|
|
309
350
|
- lib/fontist.rb
|
|
351
|
+
- lib/fontist/cache.rb
|
|
310
352
|
- lib/fontist/cache/manager.rb
|
|
311
353
|
- lib/fontist/cache/store.rb
|
|
312
354
|
- lib/fontist/cache_cli.rb
|
|
@@ -336,6 +378,7 @@ files:
|
|
|
336
378
|
- lib/fontist/import.rb
|
|
337
379
|
- lib/fontist/import/convert_formulas.rb
|
|
338
380
|
- lib/fontist/import/create_formula.rb
|
|
381
|
+
- lib/fontist/import/files.rb
|
|
339
382
|
- lib/fontist/import/files/collection_file.rb
|
|
340
383
|
- lib/fontist/import/files/font_detector.rb
|
|
341
384
|
- lib/fontist/import/font_metadata_extractor.rb
|
|
@@ -345,6 +388,7 @@ files:
|
|
|
345
388
|
- lib/fontist/import/formula_serializer.rb
|
|
346
389
|
- lib/fontist/import/google.rb
|
|
347
390
|
- lib/fontist/import/google/api.rb
|
|
391
|
+
- lib/fontist/import/google/data_sources.rb
|
|
348
392
|
- lib/fontist/import/google/data_sources/base.rb
|
|
349
393
|
- lib/fontist/import/google/data_sources/github.rb
|
|
350
394
|
- lib/fontist/import/google/data_sources/ttf.rb
|
|
@@ -354,6 +398,7 @@ files:
|
|
|
354
398
|
- lib/fontist/import/google/metadata.proto
|
|
355
399
|
- lib/fontist/import/google/metadata_adapter.rb
|
|
356
400
|
- lib/fontist/import/google/metadata_parser.rb
|
|
401
|
+
- lib/fontist/import/google/models.rb
|
|
357
402
|
- lib/fontist/import/google/models/axis.rb
|
|
358
403
|
- lib/fontist/import/google/models/axis_metadata.rb
|
|
359
404
|
- lib/fontist/import/google/models/file_metadata.rb
|
|
@@ -364,13 +409,16 @@ files:
|
|
|
364
409
|
- lib/fontist/import/google/models/source_metadata.rb
|
|
365
410
|
- lib/fontist/import/google_fonts_importer.rb
|
|
366
411
|
- lib/fontist/import/google_import.rb
|
|
412
|
+
- lib/fontist/import/helpers.rb
|
|
367
413
|
- lib/fontist/import/helpers/hash_helper.rb
|
|
368
414
|
- lib/fontist/import/helpers/system_helper.rb
|
|
369
415
|
- lib/fontist/import/import_display.rb
|
|
370
416
|
- lib/fontist/import/macos.rb
|
|
371
417
|
- lib/fontist/import/macos/macos_license.txt
|
|
372
418
|
- lib/fontist/import/manual_formula_builder.rb
|
|
419
|
+
- lib/fontist/import/models.rb
|
|
373
420
|
- lib/fontist/import/models/font_metadata.rb
|
|
421
|
+
- lib/fontist/import/otf.rb
|
|
374
422
|
- lib/fontist/import/otf/font_file.rb
|
|
375
423
|
- lib/fontist/import/recursive_extraction.rb
|
|
376
424
|
- lib/fontist/import/sil_import.rb
|
|
@@ -381,6 +429,7 @@ files:
|
|
|
381
429
|
- lib/fontist/import_source.rb
|
|
382
430
|
- lib/fontist/index.rb
|
|
383
431
|
- lib/fontist/index_cli.rb
|
|
432
|
+
- lib/fontist/indexes.rb
|
|
384
433
|
- lib/fontist/indexes/base_font_collection_index.rb
|
|
385
434
|
- lib/fontist/indexes/default_family_font_index.rb
|
|
386
435
|
- lib/fontist/indexes/directory_change.rb
|
|
@@ -396,10 +445,13 @@ files:
|
|
|
396
445
|
- lib/fontist/indexes/system_index.rb
|
|
397
446
|
- lib/fontist/indexes/user_index.rb
|
|
398
447
|
- lib/fontist/install_location.rb
|
|
448
|
+
- lib/fontist/install_locations.rb
|
|
399
449
|
- lib/fontist/install_locations/base_location.rb
|
|
400
450
|
- lib/fontist/install_locations/fontist_location.rb
|
|
401
451
|
- lib/fontist/install_locations/system_location.rb
|
|
402
452
|
- lib/fontist/install_locations/user_location.rb
|
|
453
|
+
- lib/fontist/macos.rb
|
|
454
|
+
- lib/fontist/macos/catalog.rb
|
|
403
455
|
- lib/fontist/macos/catalog/asset.rb
|
|
404
456
|
- lib/fontist/macos/catalog/base_parser.rb
|
|
405
457
|
- lib/fontist/macos/catalog/catalog_manager.rb
|
|
@@ -419,6 +471,7 @@ files:
|
|
|
419
471
|
- lib/fontist/path_scanning.rb
|
|
420
472
|
- lib/fontist/repo.rb
|
|
421
473
|
- lib/fontist/repo_cli.rb
|
|
474
|
+
- lib/fontist/resources.rb
|
|
422
475
|
- lib/fontist/resources/apple_cdn_resource.rb
|
|
423
476
|
- lib/fontist/resources/archive_resource.rb
|
|
424
477
|
- lib/fontist/resources/google_resource.rb
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
name: deploy-pages
|
|
2
|
-
|
|
3
|
-
permissions:
|
|
4
|
-
contents: read
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
branches: "main"
|
|
9
|
-
paths-ignore:
|
|
10
|
-
- README.md
|
|
11
|
-
- CONTRIBUTING.md
|
|
12
|
-
- LICENSE
|
|
13
|
-
- .gitignore
|
|
14
|
-
- .github/**
|
|
15
|
-
- "!.github/workflows/deploy-pages.yml"
|
|
16
|
-
workflow_dispatch:
|
|
17
|
-
|
|
18
|
-
concurrency:
|
|
19
|
-
group: ${{ github.workflow }}
|
|
20
|
-
cancel-in-progress: true
|
|
21
|
-
|
|
22
|
-
jobs:
|
|
23
|
-
deploy-pages:
|
|
24
|
-
environment:
|
|
25
|
-
name: github-pages
|
|
26
|
-
url: ${{ steps.deploy-pages.outputs.page_url }}
|
|
27
|
-
permissions:
|
|
28
|
-
pages: write
|
|
29
|
-
id-token: write
|
|
30
|
-
runs-on: ubuntu-latest
|
|
31
|
-
steps:
|
|
32
|
-
- uses: actions/checkout@v4
|
|
33
|
-
- uses: actions/setup-node@v4
|
|
34
|
-
with:
|
|
35
|
-
node-version: latest
|
|
36
|
-
# Lockfile is in subfolder
|
|
37
|
-
# cache: npm
|
|
38
|
-
- uses: ruby/setup-ruby@v1
|
|
39
|
-
with:
|
|
40
|
-
ruby-version: ruby
|
|
41
|
-
- run: rdoc -x docs
|
|
42
|
-
- run: npm install
|
|
43
|
-
working-directory: docs
|
|
44
|
-
- id: configure-pages
|
|
45
|
-
uses: actions/configure-pages@v4
|
|
46
|
-
- run: npm run build
|
|
47
|
-
working-directory: docs
|
|
48
|
-
env:
|
|
49
|
-
BASE_PATH: ${{ steps.configure-pages.outputs.base_path }}/
|
|
50
|
-
- run: mv docs/.vitepress/dist _site
|
|
51
|
-
- run: mv doc _site/reference/api-ruby
|
|
52
|
-
- uses: actions/upload-pages-artifact@v3
|
|
53
|
-
- id: deploy-pages
|
|
54
|
-
uses: actions/deploy-pages@v4
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
name: release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
next_version:
|
|
7
|
-
description: |
|
|
8
|
-
Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
|
|
9
|
-
Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
|
|
10
|
-
required: true
|
|
11
|
-
default: 'skip'
|
|
12
|
-
repository_dispatch:
|
|
13
|
-
types: [ do-release ]
|
|
14
|
-
|
|
15
|
-
permissions:
|
|
16
|
-
contents: read
|
|
17
|
-
<<<<<<< HEAD
|
|
18
|
-
=======
|
|
19
|
-
packages: write
|
|
20
|
-
<<<<<<< Updated upstream
|
|
21
|
-
=======
|
|
22
|
-
id-token: write
|
|
23
|
-
>>>>>>> Stashed changes
|
|
24
|
-
>>>>>>> 35f3c7d (fix: release gha)
|
|
25
|
-
|
|
26
|
-
jobs:
|
|
27
|
-
release:
|
|
28
|
-
permissions:
|
|
29
|
-
contents: write
|
|
30
|
-
packages: write
|
|
31
|
-
id-token: write
|
|
32
|
-
uses: fontist/support/.github/workflows/release.yml@main
|
|
33
|
-
with:
|
|
34
|
-
next_version: ${{ github.event.inputs.next_version }}
|
|
35
|
-
secrets:
|
|
36
|
-
rubygems-api-key: ${{ secrets.FONTIST_CI_RUBYGEMS_API_KEY }}
|
data/docs/guide/api-ruby.md
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
# Fontist Ruby library
|
|
2
|
-
|
|
3
|
-
In addition to the command-line interface, Fontist can be used as a Ruby library.
|
|
4
|
-
|
|
5
|
-
## Fontist::Font
|
|
6
|
-
|
|
7
|
-
The `Fontist::Font` is your go-to place to deal with any font using Fontist.
|
|
8
|
-
|
|
9
|
-
This interface allows you to find a font or install a font.
|
|
10
|
-
|
|
11
|
-
### Finding a font
|
|
12
|
-
|
|
13
|
-
The `Fontist::Font.find` interface can be used to find a font in your system.
|
|
14
|
-
|
|
15
|
-
It will look into the operating system specific font directories, and also the fontist specific `~/.fontist` directory.
|
|
16
|
-
|
|
17
|
-
```ruby
|
|
18
|
-
Fontist::Font.find(name)
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
- If Fontist finds a font, then it will return the paths.
|
|
22
|
-
- Otherwise, it will either raise an unsupported font error, or trigger display of installation instructions for that specific font.
|
|
23
|
-
|
|
24
|
-
### Install a font
|
|
25
|
-
|
|
26
|
-
The `Fontist::Font.install` interface can be used to install any supported font.
|
|
27
|
-
|
|
28
|
-
This interface first checks if you already have that font installed or not and if you do, then it will return the paths.
|
|
29
|
-
|
|
30
|
-
If you don't have a font but that font is supported by Fontist, then it will download the font and copy it to `~/.fontist` directory and also return the paths.
|
|
31
|
-
|
|
32
|
-
```ruby
|
|
33
|
-
Fontist::Font.install(name, confirmation: "no")
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
If there are issues detected with the provided font, such as the font is not supported, those errors would be raised.
|
|
37
|
-
|
|
38
|
-
### List all fonts
|
|
39
|
-
|
|
40
|
-
The `Fontist::Font` interface exposes an interface to list all supported fonts.
|
|
41
|
-
|
|
42
|
-
This might be useful if you want to know the name of the font or the available styles. You can do that by using:
|
|
43
|
-
|
|
44
|
-
```ruby
|
|
45
|
-
Fontist::Font.all
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
The return values are model objects, so you can easily access their properties and perform operations on them.
|
|
49
|
-
|
|
50
|
-
## Fontist::Formula
|
|
51
|
-
|
|
52
|
-
The `fontist` gem internally uses the `Fontist::Formula` interface to find a registered formula or fonts supported by any formula. Unless you need to do anything with that, you shouldn't need to work with this interface directly. But if you do, then these are the public interfaces it offers.
|
|
53
|
-
|
|
54
|
-
### Find a formula
|
|
55
|
-
|
|
56
|
-
The `Fontist::Formula.find` interface allows you to find any of the registered formulas. This interface takes a font name as an argument and it looks through each of the registered formulas that offer this font installation. Usages:
|
|
57
|
-
|
|
58
|
-
```ruby
|
|
59
|
-
Fontist::Formula.find("Calibri")
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
This method will search and return a Fontist formula for the provided keyword which allows for further processing, such as license checks or proceeding with the installation of the font in your system.
|
|
63
|
-
|
|
64
|
-
### List font styles supported by a formula
|
|
65
|
-
|
|
66
|
-
Normally, each font name can be associated with multiple styles or collections, for example, the `Calibri` font might contain `regular`, `bold`, or `italic` styles fonts and if you want an interface that can return the complete list then this is your friend.
|
|
67
|
-
|
|
68
|
-
You can use it as following:
|
|
69
|
-
|
|
70
|
-
```ruby
|
|
71
|
-
Fontist::Formula.find_fonts("Calibri")
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### List all formulas
|
|
75
|
-
|
|
76
|
-
The `Fontist::Formula` interface exposes an interface to list all registered font formulas. This might be useful if you want to know the name of the formula or what type of fonts can be installed using that formula. Usages:
|
|
77
|
-
|
|
78
|
-
```ruby
|
|
79
|
-
Fontist::Formula.all
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
The return values are model objects, so you can easily access their properties and perform operations on them.
|
|
83
|
-
|
|
84
|
-
## Fontist::Manifest
|
|
85
|
-
|
|
86
|
-
### Global options
|
|
87
|
-
|
|
88
|
-
Fontist can be switched to use the preferred family names. This format was used prior to v1.10.
|
|
89
|
-
|
|
90
|
-
```ruby
|
|
91
|
-
Fontist.preferred_family = true
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Manifest from YAML file or Hash
|
|
95
|
-
|
|
96
|
-
Fontist lets you find font locations from a defined manifest Hash in the following format:
|
|
97
|
-
|
|
98
|
-
```ruby
|
|
99
|
-
{
|
|
100
|
-
"Segoe UI"=>["Regular", "Bold"],
|
|
101
|
-
"Roboto Mono"=>["Regular"]
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Calling the following code returns a nested Hash with font paths and names. Font name is useful to choose a specific font in a font collection file (TTC).
|
|
106
|
-
|
|
107
|
-
```ruby
|
|
108
|
-
Fontist::Manifest.from_yaml(manifest)
|
|
109
|
-
Fontist::Manifest.from_hash(manifest)
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
```ruby
|
|
113
|
-
{
|
|
114
|
-
"Segoe UI"=> {
|
|
115
|
-
"Regular"=>{
|
|
116
|
-
"full_name"=>"Segoe UI",
|
|
117
|
-
"paths"=>["/Users/user/.fontist/fonts/SEGOEUI.TTF"]
|
|
118
|
-
},
|
|
119
|
-
"Bold"=>{
|
|
120
|
-
"full_name"=>"Segoe UI Bold",
|
|
121
|
-
"paths"=>["/Users/user/.fontist/fonts/SEGOEUIB.TTF"]
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"Roboto Mono"=> {
|
|
125
|
-
"Regular"=>{
|
|
126
|
-
"full_name"=>nil,
|
|
127
|
-
"paths"=>[]
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Fontist lets you not only obtain font locations but also install fonts from the manifest:
|
|
134
|
-
|
|
135
|
-
```ruby
|
|
136
|
-
manifest.install(confirmation: "yes")
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
It will install fonts and return their locations:
|
|
140
|
-
|
|
141
|
-
```ruby
|
|
142
|
-
{
|
|
143
|
-
"Segoe UI"=> {
|
|
144
|
-
"Regular"=>{
|
|
145
|
-
"full_name"=>"Segoe UI",
|
|
146
|
-
"paths"=>["/Users/user/.fontist/fonts/SEGOEUI.TTF"]},
|
|
147
|
-
"Bold"=>{
|
|
148
|
-
"full_name"=>"Segoe UI Bold",
|
|
149
|
-
"paths"=>["/Users/user/.fontist/fonts/SEGOEUIB.TTF"]
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
"Roboto Mono"=> {
|
|
153
|
-
"Regular"=>{
|
|
154
|
-
"full_name"=>"Roboto Mono Regular",
|
|
155
|
-
"paths"=>["/Users/user/.fontist/fonts/RobotoMono-VariableFont_wght.ttf"]
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
#### Support of YAML format
|
|
162
|
-
|
|
163
|
-
Both commands support a YAML file as an input with a `from_file` method. For example, if there is a `manifest.yml` file containing:
|
|
164
|
-
|
|
165
|
-
```yaml
|
|
166
|
-
---
|
|
167
|
-
Segoe UI:
|
|
168
|
-
- Regular
|
|
169
|
-
- Bold
|
|
170
|
-
Roboto Mono:
|
|
171
|
-
- Regular
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
Then the following calls would return font names and paths, as from the `from_hash` method (see Fontist::Manifest).
|
|
175
|
-
|
|
176
|
-
```ruby
|
|
177
|
-
manifest = Fontist::Manifest.from_file("manifest.yml")
|
|
178
|
-
manifest.install(confirmation: "yes")
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Fontist::Fontconfig
|
|
182
|
-
|
|
183
|
-
Fontist supports work with Fontconfig via the Ruby interface:
|
|
184
|
-
|
|
185
|
-
```ruby
|
|
186
|
-
Fontist::Fontconfig.update # let detect fontist fonts
|
|
187
|
-
Fontist::Fontconfig.remove # disable detection
|
|
188
|
-
Fontist::Fontconfig.remove(force: true) # do not fail if no config exists
|
|
189
|
-
```
|
data/docs/public/hero.png
DELETED
|
Binary file
|
data/docs/public/logo.png
DELETED
|
Binary file
|