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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop_todo.yml +411 -10
- data/Gemfile +1 -0
- data/docs/.vitepress/config.ts +17 -0
- data/docs/cli/create-formula.md +6 -0
- data/docs/cli/import.md +4 -0
- data/docs/guide/formulas.md +73 -0
- data/docs/guide/installation.md +62 -0
- data/docs/guide/maintainer/import.md +372 -0
- data/docs/guide/maintainer/index.md +37 -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/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 -9
- 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 +83 -36
- metadata +19 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 05672d3a03b438efbe391225909a93826f3bc28796cce2e85a07594b5079e1f7
|
|
4
|
+
data.tar.gz: 4797833807c35169995bf31ad5b4141e03d21975a292b82bb3b0e9f075e18cbb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9480bdbb4afd3b90dc3de5e7ea943d7284919f43daa4edea7a3e12559037472d2deea3eec932f4feb6aea29985c67992bab8de24703c09465a8201cca461b061
|
|
7
|
+
data.tar.gz: 423929c85c2525661fe196e62dce2f49141ec67be5e68daa0b2be8920846e18d95b2ea3206f32f2b8400633f46f6c17bb35db9968d00f547a313bd6669b20637
|
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,40 +1,441 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-
|
|
3
|
+
# on 2026-03-18 01:55:49 UTC using RuboCop version 1.85.1.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
Gemspec/RequireMFA:
|
|
12
|
+
Exclude:
|
|
13
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
14
|
+
|
|
15
|
+
# Offense count: 1
|
|
16
|
+
Gemspec/RequiredRubyVersion:
|
|
17
|
+
Exclude:
|
|
18
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
19
|
+
|
|
20
|
+
# Offense count: 1
|
|
21
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
22
|
+
Layout/ElseAlignment:
|
|
23
|
+
Exclude:
|
|
24
|
+
- 'lib/fontist/font_path.rb'
|
|
25
|
+
|
|
26
|
+
# Offense count: 1
|
|
27
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
28
|
+
Layout/EmptyLineAfterGuardClause:
|
|
29
|
+
Exclude:
|
|
30
|
+
- 'spec/fontist/font_spec.rb'
|
|
31
|
+
|
|
32
|
+
# Offense count: 1
|
|
33
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
34
|
+
# Configuration parameters: EnforcedStyleAlignWith.
|
|
35
|
+
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
|
36
|
+
Layout/EndAlignment:
|
|
37
|
+
Exclude:
|
|
38
|
+
- 'lib/fontist/font_path.rb'
|
|
39
|
+
|
|
40
|
+
# Offense count: 4
|
|
41
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
42
|
+
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
|
43
|
+
Layout/ExtraSpacing:
|
|
44
|
+
Exclude:
|
|
45
|
+
- 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
|
|
46
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
47
|
+
|
|
48
|
+
# Offense count: 1
|
|
49
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
50
|
+
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
51
|
+
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
52
|
+
Layout/IndentationWidth:
|
|
53
|
+
Exclude:
|
|
54
|
+
- 'lib/fontist/font_path.rb'
|
|
55
|
+
|
|
56
|
+
# Offense count: 1
|
|
57
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
58
|
+
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment, AllowRBSInlineAnnotation, AllowSteepAnnotation.
|
|
59
|
+
Layout/LeadingCommentSpace:
|
|
60
|
+
Exclude:
|
|
61
|
+
- 'spec/fontist/install_locations/system_location_spec.rb'
|
|
62
|
+
|
|
63
|
+
# Offense count: 1
|
|
64
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
65
|
+
Layout/LeadingEmptyLines:
|
|
66
|
+
Exclude:
|
|
67
|
+
- 'lib/fontist/macos_import_source.rb'
|
|
68
|
+
|
|
69
|
+
# Offense count: 2
|
|
70
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
71
|
+
# Configuration parameters: EnforcedStyle.
|
|
72
|
+
# SupportedStyles: space, no_space
|
|
73
|
+
Layout/LineContinuationSpacing:
|
|
74
|
+
Exclude:
|
|
75
|
+
- 'lib/fontist/import/google/data_sources/github.rb'
|
|
76
|
+
|
|
77
|
+
# Offense count: 1
|
|
78
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
79
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
80
|
+
# SupportedStyles: aligned, indented
|
|
81
|
+
Layout/LineEndStringConcatenationIndentation:
|
|
82
|
+
Exclude:
|
|
83
|
+
- 'lib/fontist/errors.rb'
|
|
84
|
+
|
|
85
|
+
# Offense count: 576
|
|
10
86
|
# This cop supports safe autocorrection (--autocorrect).
|
|
11
87
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
12
88
|
# URISchemes: http, https
|
|
13
89
|
Layout/LineLength:
|
|
90
|
+
Enabled: false
|
|
91
|
+
|
|
92
|
+
# Offense count: 5
|
|
93
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
94
|
+
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
|
|
95
|
+
# SupportedStylesForExponentOperator: space, no_space
|
|
96
|
+
# SupportedStylesForRationalLiterals: space, no_space
|
|
97
|
+
Layout/SpaceAroundOperators:
|
|
14
98
|
Exclude:
|
|
15
|
-
- '
|
|
16
|
-
- '
|
|
99
|
+
- 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
|
|
100
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
17
101
|
|
|
18
102
|
# Offense count: 1
|
|
19
103
|
# This cop supports safe autocorrection (--autocorrect).
|
|
20
|
-
# Configuration parameters:
|
|
21
|
-
|
|
104
|
+
# Configuration parameters: EnforcedStyle.
|
|
105
|
+
# SupportedStyles: final_newline, final_blank_line
|
|
106
|
+
Layout/TrailingEmptyLines:
|
|
107
|
+
Exclude:
|
|
108
|
+
- 'spec/fontist/utils/github_url_spec.rb'
|
|
109
|
+
|
|
110
|
+
# Offense count: 1
|
|
111
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
112
|
+
# Configuration parameters: AllowInHeredoc.
|
|
113
|
+
Layout/TrailingWhitespace:
|
|
22
114
|
Exclude:
|
|
23
115
|
- 'spec/fontist/manifest_spec.rb'
|
|
24
116
|
|
|
25
|
-
# Offense count:
|
|
117
|
+
# Offense count: 5
|
|
118
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
119
|
+
Lint/AmbiguousOperatorPrecedence:
|
|
120
|
+
Exclude:
|
|
121
|
+
- 'lib/fontist/import/import_display.rb'
|
|
122
|
+
- 'lib/fontist/utils/downloader.rb'
|
|
123
|
+
- 'lib/fontist/utils/system.rb'
|
|
124
|
+
|
|
125
|
+
# Offense count: 1
|
|
126
|
+
Lint/CopDirectiveSyntax:
|
|
127
|
+
Exclude:
|
|
128
|
+
- 'spec/support/fontist_helper.rb'
|
|
129
|
+
|
|
130
|
+
# Offense count: 3
|
|
131
|
+
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
|
132
|
+
Lint/DuplicateBranch:
|
|
133
|
+
Exclude:
|
|
134
|
+
- 'lib/fontist/helpers.rb'
|
|
135
|
+
- 'lib/fontist/import/import_display.rb'
|
|
136
|
+
- 'lib/fontist/utils/downloader.rb'
|
|
137
|
+
|
|
138
|
+
# Offense count: 2
|
|
139
|
+
Lint/DuplicateMethods:
|
|
140
|
+
Exclude:
|
|
141
|
+
- 'lib/fontist/import/recursive_extraction.rb'
|
|
142
|
+
- 'lib/fontist/system_index.rb'
|
|
143
|
+
|
|
144
|
+
# Offense count: 9
|
|
145
|
+
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
|
146
|
+
Lint/EmptyBlock:
|
|
147
|
+
Exclude:
|
|
148
|
+
- 'spec/fontist/resources/apple_cdn_resource_spec.rb'
|
|
149
|
+
- 'spec/fontist/utils/file_ops_spec.rb'
|
|
150
|
+
|
|
151
|
+
# Offense count: 28
|
|
152
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
153
|
+
Lint/NonAtomicFileOperation:
|
|
154
|
+
Exclude:
|
|
155
|
+
- 'lib/fontist/cache/store.rb'
|
|
156
|
+
- 'spec/fontist/cache/manager_spec.rb'
|
|
157
|
+
- 'spec/fontist/cache/store_spec.rb'
|
|
158
|
+
- 'spec/fontist/indexes/directory_change_spec.rb'
|
|
159
|
+
- 'spec/fontist/indexes/directory_snapshot_spec.rb'
|
|
160
|
+
- 'spec/fontist/indexes/incremental_index_updater_spec.rb'
|
|
161
|
+
- 'spec/fontist/indexes/incremental_scanner_spec.rb'
|
|
162
|
+
- 'spec/fontist/manifest_spec.rb'
|
|
163
|
+
- 'spec/fontist/path_scanning_spec.rb'
|
|
164
|
+
- 'spec/fontist/utils/file_ops_spec.rb'
|
|
165
|
+
- 'spec/support/fontist_helper.rb'
|
|
166
|
+
- 'spec/support/spec_isolation_manager.rb'
|
|
167
|
+
- 'spec/support/system_fonts.rb'
|
|
168
|
+
- 'spec/support/windows_test_helper.rb'
|
|
169
|
+
|
|
170
|
+
# Offense count: 1
|
|
171
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
172
|
+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
173
|
+
# NotImplementedExceptions: NotImplementedError
|
|
174
|
+
Lint/UnusedMethodArgument:
|
|
175
|
+
Exclude:
|
|
176
|
+
- 'lib/fontist/validator.rb'
|
|
177
|
+
|
|
178
|
+
# Offense count: 1
|
|
179
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
180
|
+
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
|
181
|
+
Lint/UselessAccessModifier:
|
|
182
|
+
Exclude:
|
|
183
|
+
- 'lib/fontist/utils/downloader.rb'
|
|
184
|
+
|
|
185
|
+
# Offense count: 1
|
|
186
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
187
|
+
Lint/UselessAssignment:
|
|
188
|
+
Exclude:
|
|
189
|
+
- 'lib/fontist/cache/store.rb'
|
|
190
|
+
|
|
191
|
+
# Offense count: 98
|
|
192
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
193
|
+
Metrics/AbcSize:
|
|
194
|
+
Enabled: false
|
|
195
|
+
|
|
196
|
+
# Offense count: 10
|
|
26
197
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
27
198
|
# AllowedMethods: refine
|
|
28
199
|
Metrics/BlockLength:
|
|
29
|
-
Max:
|
|
200
|
+
Max: 63
|
|
30
201
|
|
|
31
|
-
# Offense count:
|
|
202
|
+
# Offense count: 57
|
|
203
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
204
|
+
Metrics/CyclomaticComplexity:
|
|
205
|
+
Enabled: false
|
|
206
|
+
|
|
207
|
+
# Offense count: 160
|
|
32
208
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
33
209
|
Metrics/MethodLength:
|
|
34
|
-
Max:
|
|
210
|
+
Max: 129
|
|
211
|
+
|
|
212
|
+
# Offense count: 3
|
|
213
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
|
214
|
+
Metrics/ParameterLists:
|
|
215
|
+
Max: 6
|
|
216
|
+
|
|
217
|
+
# Offense count: 46
|
|
218
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
219
|
+
Metrics/PerceivedComplexity:
|
|
220
|
+
Enabled: false
|
|
221
|
+
|
|
222
|
+
# Offense count: 3
|
|
223
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
224
|
+
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
|
225
|
+
Naming/MethodParameterName:
|
|
226
|
+
Exclude:
|
|
227
|
+
- 'spec/fontist/memoizable_spec.rb'
|
|
228
|
+
|
|
229
|
+
# Offense count: 4
|
|
230
|
+
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
|
|
231
|
+
# AllowedMethods: call
|
|
232
|
+
# WaywardPredicates: infinite?, nonzero?
|
|
233
|
+
Naming/PredicateMethod:
|
|
234
|
+
Exclude:
|
|
235
|
+
- 'lib/fontist.rb'
|
|
236
|
+
- 'lib/fontist/font.rb'
|
|
237
|
+
- 'lib/fontist/import/google/models/metadata.rb'
|
|
238
|
+
- 'spec/fontist/memoizable_spec.rb'
|
|
239
|
+
|
|
240
|
+
# Offense count: 4
|
|
241
|
+
# Configuration parameters: MinSize.
|
|
242
|
+
Performance/CollectionLiteralInLoop:
|
|
243
|
+
Exclude:
|
|
244
|
+
- 'lib/fontist/cache/manager.rb'
|
|
245
|
+
- 'lib/fontist/import/otf/font_file.rb'
|
|
246
|
+
- 'spec/fontist/import/create_formula_spec.rb'
|
|
247
|
+
|
|
248
|
+
# Offense count: 16
|
|
249
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
250
|
+
Performance/MapCompact:
|
|
251
|
+
Exclude:
|
|
252
|
+
- 'lib/fontist/font.rb'
|
|
253
|
+
- 'lib/fontist/formula.rb'
|
|
254
|
+
- 'lib/fontist/import/formula_builder.rb'
|
|
255
|
+
- 'lib/fontist/import/google/data_sources/github.rb'
|
|
256
|
+
- 'lib/fontist/import/google/font_database.rb'
|
|
257
|
+
- 'lib/fontist/import/google/metadata_adapter.rb'
|
|
258
|
+
- 'lib/fontist/indexes/incremental_scanner.rb'
|
|
259
|
+
- 'lib/fontist/macos/catalog/asset.rb'
|
|
260
|
+
- 'lib/fontist/system_index.rb'
|
|
261
|
+
- 'lib/fontist/validation.rb'
|
|
262
|
+
- 'lib/fontist/validator.rb'
|
|
263
|
+
|
|
264
|
+
# Offense count: 2
|
|
265
|
+
Security/MarshalLoad:
|
|
266
|
+
Exclude:
|
|
267
|
+
- 'lib/fontist/cache/store.rb'
|
|
268
|
+
- 'spec/fontist/cache/store_spec.rb'
|
|
269
|
+
|
|
270
|
+
# Offense count: 4
|
|
271
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
272
|
+
# Configuration parameters: EnforcedStyle.
|
|
273
|
+
# SupportedStyles: trailing_conditional, ternary
|
|
274
|
+
Style/EmptyStringInsideInterpolation:
|
|
275
|
+
Exclude:
|
|
276
|
+
- 'lib/fontist/import/import_display.rb'
|
|
277
|
+
- 'lib/fontist/import/macos.rb'
|
|
278
|
+
|
|
279
|
+
# Offense count: 2
|
|
280
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
281
|
+
Style/ExpandPathArguments:
|
|
282
|
+
Exclude:
|
|
283
|
+
- 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
|
|
284
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
285
|
+
|
|
286
|
+
# Offense count: 12
|
|
287
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
288
|
+
# Configuration parameters: AllowedVars, DefaultToNil.
|
|
289
|
+
Style/FetchEnvVar:
|
|
290
|
+
Exclude:
|
|
291
|
+
- 'lib/fontist/utils/system.rb'
|
|
292
|
+
- 'spec/fontist/import/google/data_sources/base_spec.rb'
|
|
293
|
+
- 'spec/fontist/import/google/data_sources/ttf_spec.rb'
|
|
294
|
+
- 'spec/fontist/import/google/data_sources/vf_spec.rb'
|
|
295
|
+
- 'spec/fontist/import/google/data_sources/woff2_spec.rb'
|
|
296
|
+
- 'spec/fontist/install_locations/system_location_spec.rb'
|
|
297
|
+
- 'spec/support/fontist_helper.rb'
|
|
298
|
+
- 'spec/support/fresh_home.rb'
|
|
299
|
+
- 'spec/support/vcr_setup.rb'
|
|
300
|
+
|
|
301
|
+
# Offense count: 1
|
|
302
|
+
Style/FileOpen:
|
|
303
|
+
Exclude:
|
|
304
|
+
- 'lib/fontist/utils/locking.rb'
|
|
305
|
+
|
|
306
|
+
# Offense count: 1
|
|
307
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
308
|
+
Style/FileWrite:
|
|
309
|
+
Exclude:
|
|
310
|
+
- 'lib/fontist/import/upgrade_formulas.rb'
|
|
311
|
+
|
|
312
|
+
# Offense count: 1
|
|
313
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
314
|
+
# Configuration parameters: AllowSplatArgument.
|
|
315
|
+
Style/HashConversion:
|
|
316
|
+
Exclude:
|
|
317
|
+
- 'lib/fontist/system_index.rb'
|
|
35
318
|
|
|
36
319
|
# Offense count: 1
|
|
37
320
|
# Configuration parameters: MinBranchesCount.
|
|
38
321
|
Style/HashLikeCase:
|
|
39
322
|
Exclude:
|
|
40
323
|
- 'spec/support/platform_fonts.rb'
|
|
324
|
+
|
|
325
|
+
# Offense count: 6
|
|
326
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
327
|
+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
|
328
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
|
329
|
+
# SupportedShorthandSyntax: always, never, either, consistent, either_consistent
|
|
330
|
+
Style/HashSyntax:
|
|
331
|
+
Exclude:
|
|
332
|
+
- 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
|
|
333
|
+
- 'spec/fontist/font_spec.rb'
|
|
334
|
+
- 'spec/fontist/formulas_isolation_spec.rb'
|
|
335
|
+
- 'spec/fontist/manifest_spec.rb'
|
|
336
|
+
|
|
337
|
+
# Offense count: 4
|
|
338
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
339
|
+
Style/IdenticalConditionalBranches:
|
|
340
|
+
Exclude:
|
|
341
|
+
- 'lib/fontist/helpers.rb'
|
|
342
|
+
- 'lib/fontist/import/import_display.rb'
|
|
343
|
+
|
|
344
|
+
# Offense count: 3
|
|
345
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
346
|
+
Style/MapToHash:
|
|
347
|
+
Exclude:
|
|
348
|
+
- 'lib/fontist/system_index.rb'
|
|
349
|
+
- 'lib/fontist/utils/downloader.rb'
|
|
350
|
+
- 'spec/fontist/indexes/incremental_scanner_spec.rb'
|
|
351
|
+
|
|
352
|
+
# Offense count: 1
|
|
353
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
354
|
+
# Configuration parameters: EnforcedStyle.
|
|
355
|
+
# SupportedStyles: literals, strict
|
|
356
|
+
Style/MutableConstant:
|
|
357
|
+
Exclude:
|
|
358
|
+
- 'lib/fontist/utils/github_url.rb'
|
|
359
|
+
|
|
360
|
+
# Offense count: 1
|
|
361
|
+
Style/OpenStructUse:
|
|
362
|
+
Exclude:
|
|
363
|
+
- 'spec/fontist/cache/store_spec.rb'
|
|
364
|
+
|
|
365
|
+
# Offense count: 1
|
|
366
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
367
|
+
Style/PartitionInsteadOfDoubleSelect:
|
|
368
|
+
Exclude:
|
|
369
|
+
- 'spec/fontist/import/google/data_sources/vf_spec.rb'
|
|
370
|
+
|
|
371
|
+
# Offense count: 3
|
|
372
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
373
|
+
Style/ReduceToHash:
|
|
374
|
+
Exclude:
|
|
375
|
+
- 'lib/fontist/import/google/font_database.rb'
|
|
376
|
+
- 'lib/fontist/indexes/directory_snapshot.rb'
|
|
377
|
+
|
|
378
|
+
# Offense count: 1
|
|
379
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
380
|
+
Style/RedundantBegin:
|
|
381
|
+
Exclude:
|
|
382
|
+
- 'spec/fontist/font_spec.rb'
|
|
383
|
+
|
|
384
|
+
# Offense count: 1
|
|
385
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
386
|
+
Style/RedundantRegexpArgument:
|
|
387
|
+
Exclude:
|
|
388
|
+
- 'lib/fontist/repo.rb'
|
|
389
|
+
|
|
390
|
+
# Offense count: 2
|
|
391
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
392
|
+
Style/RescueModifier:
|
|
393
|
+
Exclude:
|
|
394
|
+
- 'lib/fontist/cache/store.rb'
|
|
395
|
+
|
|
396
|
+
# Offense count: 1
|
|
397
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
398
|
+
# Configuration parameters: EnforcedStyle.
|
|
399
|
+
# SupportedStyles: implicit, explicit
|
|
400
|
+
Style/RescueStandardError:
|
|
401
|
+
Exclude:
|
|
402
|
+
- 'lib/fontist/cache/store.rb'
|
|
403
|
+
|
|
404
|
+
# Offense count: 1
|
|
405
|
+
# Configuration parameters: Max.
|
|
406
|
+
Style/SafeNavigationChainLength:
|
|
407
|
+
Exclude:
|
|
408
|
+
- 'lib/fontist/system_index.rb'
|
|
409
|
+
|
|
410
|
+
# Offense count: 2
|
|
411
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
412
|
+
# Configuration parameters: Mode.
|
|
413
|
+
Style/StringConcatenation:
|
|
414
|
+
Exclude:
|
|
415
|
+
- 'lib/fontist/cache/store.rb'
|
|
416
|
+
- 'spec/fontist/system_index_spec.rb'
|
|
417
|
+
|
|
418
|
+
# Offense count: 5
|
|
419
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
420
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
421
|
+
# SupportedStyles: single_quotes, double_quotes
|
|
422
|
+
Style/StringLiterals:
|
|
423
|
+
Exclude:
|
|
424
|
+
- 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
|
|
425
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
426
|
+
|
|
427
|
+
# Offense count: 1
|
|
428
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
429
|
+
Style/SuperArguments:
|
|
430
|
+
Exclude:
|
|
431
|
+
- 'lib/fontist/import/google/models/font_family.rb'
|
|
432
|
+
|
|
433
|
+
# Offense count: 6
|
|
434
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
435
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
|
436
|
+
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
437
|
+
Style/TrailingCommaInArguments:
|
|
438
|
+
Exclude:
|
|
439
|
+
- 'lib/fontist/utils/github_url.rb'
|
|
440
|
+
- 'spec/fontist/system_index_spec.rb'
|
|
441
|
+
- 'spec/fontist/utils/github_url_spec.rb'
|
data/Gemfile
CHANGED
data/docs/.vitepress/config.ts
CHANGED
|
@@ -125,6 +125,23 @@ export default defineConfig({
|
|
|
125
125
|
},
|
|
126
126
|
],
|
|
127
127
|
},
|
|
128
|
+
{
|
|
129
|
+
text: "Platforms",
|
|
130
|
+
collapsed: true,
|
|
131
|
+
items: [
|
|
132
|
+
{ text: "Overview", link: "/guide/platforms/" },
|
|
133
|
+
{ text: "macOS", link: "/guide/platforms/macos" },
|
|
134
|
+
{ text: "Windows", link: "/guide/platforms/windows" },
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
text: "Maintainer Docs",
|
|
139
|
+
collapsed: true,
|
|
140
|
+
items: [
|
|
141
|
+
{ text: "Overview", link: "/guide/maintainer/" },
|
|
142
|
+
{ text: "Importing Fonts", link: "/guide/maintainer/import" },
|
|
143
|
+
],
|
|
144
|
+
},
|
|
128
145
|
],
|
|
129
146
|
"/cli/": [
|
|
130
147
|
{
|
data/docs/cli/create-formula.md
CHANGED
|
@@ -41,6 +41,12 @@ fontist create-formula https://example.com/fonts/myfont.zip --file-pattern "*.ot
|
|
|
41
41
|
|
|
42
42
|
# Add mirror URLs
|
|
43
43
|
fontist create-formula https://example.com/fonts/myfont.zip --mirror https://mirror.example.com/fonts/myfont.zip
|
|
44
|
+
|
|
45
|
+
# Create formula with name prefix (for compatibility fonts)
|
|
46
|
+
fontist create-formula https://dl.winehq.org/wine/source/10.x/wine-10.18.tar.xz \
|
|
47
|
+
--subdir fonts \
|
|
48
|
+
--file-pattern "*.ttf" \
|
|
49
|
+
--name-prefix "Wine "
|
|
44
50
|
```
|
|
45
51
|
|
|
46
52
|
## How It Works
|
data/docs/cli/import.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Import fonts from external sources and create Fontist formulas.
|
|
4
4
|
|
|
5
|
+
::: warning Maintainer Only
|
|
6
|
+
These commands are for Fontist formula maintainers only. End users should use [`fontist install`](/cli/install) to install fonts from the official repository.
|
|
7
|
+
:::
|
|
8
|
+
|
|
5
9
|
## Subcommands
|
|
6
10
|
|
|
7
11
|
| Command | Description |
|
data/docs/guide/formulas.md
CHANGED
|
@@ -184,6 +184,79 @@ Private repos are stored alongside the main formulas:
|
|
|
184
184
|
|
|
185
185
|
See the [repo command reference](/cli/repo) for complete command documentation.
|
|
186
186
|
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Advanced Formula Features
|
|
190
|
+
|
|
191
|
+
### Overriding Font Metadata
|
|
192
|
+
|
|
193
|
+
Some fonts (especially older ones) contain inconsistent or imperfect metadata. For example, some fonts apply different OTF `Family` values for different font styles, which prevents all styles from being registered under the same family.
|
|
194
|
+
|
|
195
|
+
The `override:` key allows you to correct metadata without modifying the font files:
|
|
196
|
+
|
|
197
|
+
```yaml
|
|
198
|
+
fonts:
|
|
199
|
+
- name: Frutiger 45 Light
|
|
200
|
+
styles:
|
|
201
|
+
- family_name: Frutiger 45 Light
|
|
202
|
+
type: Regular
|
|
203
|
+
full_name: Frutiger-Light
|
|
204
|
+
post_script_name: Frutiger-Light
|
|
205
|
+
override:
|
|
206
|
+
preferred_family_name: Frutiger
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
This override:
|
|
210
|
+
- Does not modify the actual font file
|
|
211
|
+
- Only affects Fontist's internal indexing
|
|
212
|
+
- Allows all Frutiger fonts to be installed together:
|
|
213
|
+
|
|
214
|
+
```sh
|
|
215
|
+
fontist install "Frutiger" --preferred-family
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### HTTP Authentication
|
|
219
|
+
|
|
220
|
+
Private formula repositories may require authentication. Configure this when setting up the repository:
|
|
221
|
+
|
|
222
|
+
```sh
|
|
223
|
+
# GitLab example with private token
|
|
224
|
+
fontist repo setup company-fonts \
|
|
225
|
+
"https://user:${PRIVATE_TOKEN}@gitlab.com/company/font-formulas.git"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Authorization Headers
|
|
229
|
+
|
|
230
|
+
For private archives (e.g., GitHub releases), add authorization headers to the formula:
|
|
231
|
+
|
|
232
|
+
```yaml
|
|
233
|
+
resources:
|
|
234
|
+
fonts.zip:
|
|
235
|
+
urls:
|
|
236
|
+
- url: https://github.com/company/fonts/releases/assets/12345
|
|
237
|
+
headers:
|
|
238
|
+
Accept: application/octet-stream
|
|
239
|
+
Authorization: token ghp_your_token_here
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
::: warning Token Scopes
|
|
243
|
+
GitHub tokens need at least the `repo` scope for access to release assets. Generate tokens at [GitHub Settings > Tokens](https://github.com/settings/tokens).
|
|
244
|
+
:::
|
|
245
|
+
|
|
246
|
+
### Name Prefix Option
|
|
247
|
+
|
|
248
|
+
When creating formulas for compatibility or replacement fonts, use `--name-prefix` to distinguish them:
|
|
249
|
+
|
|
250
|
+
```sh
|
|
251
|
+
# Create formula for Wine compatibility fonts
|
|
252
|
+
fontist create-formula https://dl.winehq.org/wine/source/10.x/wine-10.18.tar.xz \
|
|
253
|
+
--subdir fonts \
|
|
254
|
+
--file-pattern '*.ttf' \
|
|
255
|
+
--name-prefix 'Wine '
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
This generates a formula where all fonts have names prefixed with "Wine ", making it clear these are Wine compatibility fonts rather than the original Microsoft fonts.
|
|
259
|
+
|
|
187
260
|
## Related
|
|
188
261
|
|
|
189
262
|
- [How Fontist Works](/guide/how-it-works) - Internal architecture and indexes
|
data/docs/guide/installation.md
CHANGED
|
@@ -43,6 +43,34 @@ macOS comes with Ruby pre-installed. If you encounter permission issues, conside
|
|
|
43
43
|
|
|
44
44
|
On Windows, we recommend using [RubyInstaller](https://rubyinstaller.org/) which includes the DevKit needed for native extensions.
|
|
45
45
|
|
|
46
|
+
#### Windows Installation Steps
|
|
47
|
+
|
|
48
|
+
1. **Download RubyInstaller** from [rubyinstaller.org](https://rubyinstaller.org/downloads/)
|
|
49
|
+
- Select the **"Ruby+Devkit"** version (not the plain Ruby version)
|
|
50
|
+
- Example: `Ruby+Devkit 3.2.X (x64)`
|
|
51
|
+
|
|
52
|
+
2. **Run the installer**
|
|
53
|
+
- Check "Add Ruby executables to your PATH"
|
|
54
|
+
- Check "Associate .rb files with this Ruby installation"
|
|
55
|
+
|
|
56
|
+
3. **Set up MSYS2** (required for native extensions):
|
|
57
|
+
```powershell
|
|
58
|
+
ridk install
|
|
59
|
+
```
|
|
60
|
+
Select option **3** (MSYS2 and MINGW development toolchain) when prompted.
|
|
61
|
+
|
|
62
|
+
4. **Install Git for Windows** from [git-scm.com](https://git-scm.com/download/win)
|
|
63
|
+
- Required for `fontist update` and `fontist repo` commands
|
|
64
|
+
|
|
65
|
+
5. **Verify installation**:
|
|
66
|
+
```powershell
|
|
67
|
+
ruby --version
|
|
68
|
+
gem install fontist
|
|
69
|
+
fontist version
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
See the [Windows Platform Guide](/guide/platforms/windows) for Windows-specific considerations.
|
|
73
|
+
|
|
46
74
|
### Linux
|
|
47
75
|
|
|
48
76
|
Most Linux distributions have Ruby available through their package managers:
|
|
@@ -94,6 +122,40 @@ sudo dnf install gcc ruby-devel
|
|
|
94
122
|
xcode-select --install
|
|
95
123
|
```
|
|
96
124
|
|
|
125
|
+
## Native Dependencies
|
|
126
|
+
|
|
127
|
+
Fontist depends on several gems with native C/C++ extensions. The following table shows what's required:
|
|
128
|
+
|
|
129
|
+
| Gem | Compiler | Purpose |
|
|
130
|
+
|-----|----------|---------|
|
|
131
|
+
| `json` | gcc | JSON parsing |
|
|
132
|
+
| `brotli` (via fontisan) | gcc | WOFF2 font decompression |
|
|
133
|
+
| `seven-zip` (via excavate) | g++ | 7z archive extraction |
|
|
134
|
+
| `libmspack` (via excavate) | gcc | CAB/CHM archive extraction |
|
|
135
|
+
| `ffi-libarchive-binary` (via excavate) | gcc | Archive extraction (zip, tar, etc.) |
|
|
136
|
+
|
|
137
|
+
::: note Prebuilt Binaries
|
|
138
|
+
Some gems like `nokogiri` and `ffi` provide prebuilt binaries for common platforms, so they typically don't require compilation.
|
|
139
|
+
:::
|
|
140
|
+
|
|
141
|
+
### Windows DevKit Setup
|
|
142
|
+
|
|
143
|
+
On Windows, native extensions require the RubyInstaller DevKit:
|
|
144
|
+
|
|
145
|
+
1. Download [RubyInstaller](https://rubyinstaller.org/downloads/) with DevKit (select "Ruby+Devkit" version)
|
|
146
|
+
|
|
147
|
+
2. Run the installer, checking "Add Ruby executables to your PATH"
|
|
148
|
+
|
|
149
|
+
3. After installation, run the following in a command prompt:
|
|
150
|
+
|
|
151
|
+
```cmd
|
|
152
|
+
ridk install
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
4. Select option **3** (MSYS2 and MINGW development toolchain) when prompted
|
|
156
|
+
|
|
157
|
+
5. Install [Git for Windows](https://git-scm.com/download/win) for `fontist update` and `fontist repo` commands
|
|
158
|
+
|
|
97
159
|
### Proxy Configuration
|
|
98
160
|
|
|
99
161
|
If you're behind a proxy, configure Git to use it:
|