fontist 1.2.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/check_google.yml +28 -0
- data/.github/workflows/macosx.yml +3 -0
- data/.github/workflows/ubuntu.yml +1 -1
- data/.github/workflows/windows.yml +1 -1
- data/.gitignore +6 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +22 -0
- data/README.md +224 -0
- data/bin/check_google +8 -0
- data/bin/convert_formulas +8 -0
- data/bin/fontist +7 -0
- data/bin/generate_otfinfo +8 -0
- data/bin/import_google +8 -0
- data/fontist.gemspec +16 -1
- data/lib/fontist.rb +23 -13
- data/lib/fontist/cli.rb +157 -0
- data/lib/fontist/errors.rb +6 -1
- data/lib/fontist/font.rb +165 -6
- data/lib/fontist/font_formula.rb +8 -4
- data/lib/fontist/fontist_font.rb +70 -0
- data/lib/fontist/formula.rb +27 -9
- data/lib/fontist/formula_template.rb +108 -0
- data/lib/fontist/formulas.rb +41 -0
- data/lib/fontist/import.rb +9 -0
- data/lib/fontist/import/convert_formulas.rb +65 -0
- data/lib/fontist/import/create_formula.rb +74 -0
- data/lib/fontist/import/extractors.rb +5 -0
- data/lib/fontist/import/extractors/cab_extractor.rb +37 -0
- data/lib/fontist/import/extractors/extractor.rb +19 -0
- data/lib/fontist/import/extractors/ole_extractor.rb +41 -0
- data/lib/fontist/import/extractors/seven_zip_extractor.rb +44 -0
- data/lib/fontist/import/extractors/zip_extractor.rb +31 -0
- data/lib/fontist/import/files/collection_file.rb +47 -0
- data/lib/fontist/import/formula_builder.rb +162 -0
- data/lib/fontist/import/formula_serializer.rb +133 -0
- data/lib/fontist/import/google.rb +16 -0
- data/lib/fontist/import/google/fonts_public.md +10 -0
- data/lib/fontist/import/google/fonts_public.pb.rb +71 -0
- data/lib/fontist/import/google/fonts_public.proto +46 -0
- data/lib/fontist/import/google/new_fonts_fetcher.rb +121 -0
- data/lib/fontist/import/google/skiplist.yml +8 -0
- data/lib/fontist/import/google_check.rb +34 -0
- data/lib/fontist/import/google_import.rb +180 -0
- data/lib/fontist/import/helpers/hash_helper.rb +13 -0
- data/lib/fontist/import/helpers/system_helper.rb +23 -0
- data/lib/fontist/import/otf/font_file.rb +91 -0
- data/lib/fontist/import/otf_parser.rb +25 -0
- data/lib/fontist/import/otf_style.rb +29 -0
- data/lib/fontist/import/otfinfo/otfinfo_requirement.rb +22 -0
- data/lib/fontist/import/otfinfo/template.erb +20 -0
- data/lib/fontist/import/otfinfo_generate.rb +45 -0
- data/lib/fontist/import/recursive_extraction.rb +128 -0
- data/lib/fontist/import/template_helper.rb +19 -0
- data/lib/fontist/import/text_helper.rb +30 -0
- data/lib/fontist/manifest.rb +2 -0
- data/lib/fontist/manifest/common.rb +60 -0
- data/lib/fontist/manifest/install.rb +36 -0
- data/lib/fontist/manifest/locations.rb +13 -0
- data/lib/fontist/registry.rb +1 -0
- data/lib/fontist/system.yml +4 -1
- data/lib/fontist/system_font.rb +62 -22
- data/lib/fontist/utils.rb +5 -0
- data/lib/fontist/utils/cache.rb +72 -0
- data/lib/fontist/utils/downloader.rb +22 -4
- data/lib/fontist/utils/dsl.rb +4 -0
- data/lib/fontist/utils/dsl/font.rb +37 -0
- data/lib/fontist/utils/exe_extractor.rb +18 -18
- data/lib/fontist/utils/msi_extractor.rb +31 -0
- data/lib/fontist/utils/seven_zip_extractor.rb +41 -0
- data/lib/fontist/utils/system.rb +23 -0
- data/lib/fontist/utils/ui.rb +23 -0
- data/lib/fontist/utils/zip_extractor.rb +9 -4
- data/lib/fontist/version.rb +1 -1
- metadata +186 -49
- data/lib/fontist/formulas/andale_font.rb +0 -79
- data/lib/fontist/formulas/arial_black_font.rb +0 -78
- data/lib/fontist/formulas/cleartype_fonts.rb +0 -226
- data/lib/fontist/formulas/comic_font.rb +0 -77
- data/lib/fontist/formulas/courier_font.rb +0 -80
- data/lib/fontist/formulas/euphemia_font.rb +0 -85
- data/lib/fontist/formulas/georgia_font.rb +0 -79
- data/lib/fontist/formulas/impact_font.rb +0 -77
- data/lib/fontist/formulas/montserrat_font.rb +0 -132
- data/lib/fontist/formulas/ms_truetype_fonts.rb +0 -124
- data/lib/fontist/formulas/open_sans_fonts.rb +0 -263
- data/lib/fontist/formulas/overpass_font.rb +0 -73
- data/lib/fontist/formulas/source_fonts.rb +0 -109
- data/lib/fontist/formulas/stix_fonts.rb +0 -108
- data/lib/fontist/formulas/tahoma_font.rb +0 -146
- data/lib/fontist/formulas/webding_font.rb +0 -77
- data/spec/fontist/font_formula_spec.rb +0 -67
- data/spec/fontist/font_spec.rb +0 -87
- data/spec/fontist/formula_spec.rb +0 -67
- data/spec/fontist/formulas/andale_font_spec.rb +0 -29
- data/spec/fontist/formulas/arial_black_font_spec.rb +0 -29
- data/spec/fontist/formulas/cleartype_fonts_spec.rb +0 -38
- data/spec/fontist/formulas/comic_font_spec.rb +0 -29
- data/spec/fontist/formulas/courier_font_spec.rb +0 -29
- data/spec/fontist/formulas/euphemia_font_spec.rb +0 -29
- data/spec/fontist/formulas/georgia_font_spec.rb +0 -29
- data/spec/fontist/formulas/impact_font_spec.rb +0 -29
- data/spec/fontist/formulas/montserrat_font_spec.rb +0 -29
- data/spec/fontist/formulas/ms_truetype_fonts_spec.rb +0 -29
- data/spec/fontist/formulas/open_sans_fonts_spec.rb +0 -29
- data/spec/fontist/formulas/overpass_font_spec.rb +0 -29
- data/spec/fontist/formulas/source_fonts_spec.rb +0 -31
- data/spec/fontist/formulas/stix_fonts_spec.rb +0 -29
- data/spec/fontist/formulas/tahoma_font_spec.rb +0 -29
- data/spec/fontist/formulas/webding_font_spec.rb +0 -29
- data/spec/fontist/registry_spec.rb +0 -47
- data/spec/fontist/system_font_spec.rb +0 -44
- data/spec/fontist/utils/downloader_spec.rb +0 -35
- data/spec/fontist_spec.rb +0 -5
- data/spec/spec_helper.rb +0 -22
- data/spec/support/fontist_helper.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a35bdc7e99674109bec5810eb8e57d91516ff93f7cf4aefbb608e0298a010f76
|
4
|
+
data.tar.gz: fc886de884ebc5309acb9dc6168fd6c2d7f460f11e05d9be8a1ffca8177e3b6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05f4a699ac69711925ebf9f036be06e5f5c302b9fe3cec23974bc7892ff18a73115d2373694784ee11ac8c0620b5df215a50cb9c2f173a6448a1ceb0b688753b
|
7
|
+
data.tar.gz: a41c8f091f5783cb0f2d0beabc0d92e9059f78415f36593f9de6b18eb1175d4059a38cb60710dd5064f0a8280aaa6ab9a13e68190903ed7ebe011e8b9068d39c
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: check_google
|
2
|
+
|
3
|
+
on:
|
4
|
+
schedule:
|
5
|
+
- cron: '0 0 * * *'
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
check:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
|
14
|
+
- uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: 2.6
|
17
|
+
|
18
|
+
- name: Install otfinfo
|
19
|
+
run: sudo apt-get install lcdf-typetools
|
20
|
+
|
21
|
+
- name: Install bundler
|
22
|
+
run: gem install bundler
|
23
|
+
|
24
|
+
- name: Setup
|
25
|
+
run: bin/setup
|
26
|
+
|
27
|
+
- name: Check new fonts
|
28
|
+
run: TEST_ENV=CI bin/check_google
|
data/.gitignore
CHANGED
@@ -11,6 +11,12 @@ Gemfile.lock
|
|
11
11
|
# fonts
|
12
12
|
/spec/fixtures/fonts/*
|
13
13
|
/spec/fixtures/fonts/DejaVuSerif.ttf
|
14
|
+
/spec/fixtures/formulas/
|
15
|
+
/spec/fixtures/*
|
16
|
+
!/spec/fixtures/system.yml
|
14
17
|
|
15
18
|
# rspec failure tracking
|
16
19
|
.rspec_status
|
20
|
+
|
21
|
+
# remote file cache
|
22
|
+
.rubocop-*
|
data/.hound.yml
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
inherit_from:
|
2
|
+
- 'https://raw.githubusercontent.com/fontist/oss-guides/master/ci/rubocop.yml'
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
Exclude:
|
6
|
+
- 'lib/fontist/import/google/fonts_public.pb.rb'
|
7
|
+
- 'lib/fontist/formula_template.rb'
|
8
|
+
|
9
|
+
Rails:
|
10
|
+
Enabled: false
|
11
|
+
|
12
|
+
Metrics/LineLength:
|
13
|
+
Exclude:
|
14
|
+
- 'lib/fontist/formulas/**/*.rb'
|
15
|
+
|
16
|
+
Layout/IndentFirstHashElement:
|
17
|
+
Exclude:
|
18
|
+
- 'lib/fontist/formulas/**/*.rb'
|
19
|
+
|
20
|
+
Layout/IndentHeredoc:
|
21
|
+
Exclude:
|
22
|
+
- 'lib/fontist/formulas/**/*.rb'
|
data/README.md
CHANGED
@@ -26,6 +26,14 @@ Or install it yourself as:
|
|
26
26
|
gem install fontist
|
27
27
|
```
|
28
28
|
|
29
|
+
### Fetch formulas
|
30
|
+
|
31
|
+
After installation please fetch formulas to your system:
|
32
|
+
|
33
|
+
```sh
|
34
|
+
fontist update
|
35
|
+
```
|
36
|
+
|
29
37
|
## Usage
|
30
38
|
|
31
39
|
### Font
|
@@ -124,6 +132,182 @@ The return values are ` OpenStruct` object, so you can easily do any other
|
|
124
132
|
operation you would do in any ruby object.
|
125
133
|
|
126
134
|
|
135
|
+
### Manifest
|
136
|
+
|
137
|
+
#### Locations
|
138
|
+
|
139
|
+
Fontist lets find font locations from a YAML manifest of the following format:
|
140
|
+
|
141
|
+
```yml
|
142
|
+
Segoe UI:
|
143
|
+
- Regular
|
144
|
+
- Bold
|
145
|
+
Roboto Mono:
|
146
|
+
- Regular
|
147
|
+
```
|
148
|
+
|
149
|
+
Calling the following code returns a nested hash with font paths.
|
150
|
+
|
151
|
+
```ruby
|
152
|
+
Fontist::Manifest::Locations.call(manifest_path)
|
153
|
+
```
|
154
|
+
|
155
|
+
```ruby
|
156
|
+
{"Segoe UI"=>
|
157
|
+
{"Regular"=>["/Users/user/.fontist/fonts/SEGOEUI.TTF"],
|
158
|
+
"Bold"=>["/Users/user/.fontist/fonts/SEGOEUIB.TTF"]},
|
159
|
+
"Roboto Mono"=>
|
160
|
+
{"Regular"=>[]}}
|
161
|
+
```
|
162
|
+
|
163
|
+
#### Install
|
164
|
+
|
165
|
+
Fontist lets not only to get font locations but also to install fonts from the
|
166
|
+
manifest:
|
167
|
+
|
168
|
+
```ruby
|
169
|
+
Fontist::Manifest::Install.call(manifest, confirmation: "yes")
|
170
|
+
```
|
171
|
+
|
172
|
+
It will install fonts and return their locations:
|
173
|
+
|
174
|
+
```ruby
|
175
|
+
{"Segoe UI"=>
|
176
|
+
{"Regular"=>["/Users/user/.fontist/fonts/SEGOEUI.TTF"],
|
177
|
+
"Bold"=>["/Users/user/.fontist/fonts/SEGOEUIB.TTF"]},
|
178
|
+
"Roboto Mono"=>
|
179
|
+
{"Regular"=>["/Users/user/.fontist/fonts/RobotoMono-VariableFont_wght.ttf"]}}
|
180
|
+
```
|
181
|
+
|
182
|
+
### CLI
|
183
|
+
|
184
|
+
These commands makes possible to operate with fonts via command line. The CLI
|
185
|
+
properly supports exit status, so in a case of error it returns a status code
|
186
|
+
higher or equal than 1.
|
187
|
+
|
188
|
+
All searches are case-insensitive for ease of use.
|
189
|
+
|
190
|
+
#### Install
|
191
|
+
|
192
|
+
The `install` command is similar to the `Font.install` call. It first checks
|
193
|
+
whether this font is already installed, and if not, then installs the font and
|
194
|
+
returns its paths. Font or formula could be specified as a name.
|
195
|
+
|
196
|
+
```
|
197
|
+
$ fontist install "segoe ui"
|
198
|
+
These fonts are found or installed:
|
199
|
+
/Users/user/.fontist/fonts/SEGOEUI.TTF
|
200
|
+
/Users/user/.fontist/fonts/SEGOEUIB.TTF
|
201
|
+
/Users/user/.fontist/fonts/SEGOEUII.TTF
|
202
|
+
/Users/user/.fontist/fonts/SEGOEUIZ.TTF
|
203
|
+
```
|
204
|
+
|
205
|
+
#### Uninstall
|
206
|
+
|
207
|
+
Uninstalls any font supported by Fontist. Returns paths of an uninstalled font,
|
208
|
+
or prints an error telling that the font isn't installed or could not be found
|
209
|
+
in Fontist formulas. Aliased as `remove`.
|
210
|
+
|
211
|
+
```
|
212
|
+
$ fontist uninstall "segoe ui"
|
213
|
+
These fonts are removed:
|
214
|
+
/Users/user/.fontist/fonts/SEGOEUII.TTF
|
215
|
+
/Users/user/.fontist/fonts/SEGOEUIZ.TTF
|
216
|
+
/Users/user/.fontist/fonts/SEGOEUIB.TTF
|
217
|
+
/Users/user/.fontist/fonts/SEGOEUI.TTF
|
218
|
+
```
|
219
|
+
|
220
|
+
#### Status
|
221
|
+
|
222
|
+
Prints installed font paths grouped by formula and font.
|
223
|
+
|
224
|
+
```
|
225
|
+
$ fontist status "segoe ui"
|
226
|
+
Fontist::Formulas::SegoeUIFont
|
227
|
+
Segoe UI
|
228
|
+
Regular (/Users/user/.fontist/fonts/SEGOEUI.TTF)
|
229
|
+
Bold (/Users/user/.fontist/fonts/SEGOEUIB.TTF)
|
230
|
+
Italic (/Users/user/.fontist/fonts/SEGOEUII.TTF)
|
231
|
+
Bold Italic (/Users/user/.fontist/fonts/SEGOEUIZ.TTF)
|
232
|
+
```
|
233
|
+
|
234
|
+
#### List
|
235
|
+
|
236
|
+
Lists installation status of fonts supported by Fontist.
|
237
|
+
|
238
|
+
```
|
239
|
+
$ fontist list "segoe ui"
|
240
|
+
Fontist::Formulas::SegoeUIFont
|
241
|
+
Segoe UI
|
242
|
+
Regular (installed)
|
243
|
+
Bold (installed)
|
244
|
+
Italic (installed)
|
245
|
+
Bold Italic (installed)
|
246
|
+
```
|
247
|
+
|
248
|
+
```
|
249
|
+
$ fontist list "roboto mono"
|
250
|
+
Fontist::Formulas::RobotoMonoFont
|
251
|
+
Roboto Mono
|
252
|
+
Regular (uninstalled)
|
253
|
+
Italic (uninstalled)
|
254
|
+
```
|
255
|
+
|
256
|
+
#### Locations from manifest
|
257
|
+
|
258
|
+
Returns locations of fonts specified in a YAML file as an input.
|
259
|
+
|
260
|
+
For example, if there is a file `manifest.yml`:
|
261
|
+
|
262
|
+
```yml
|
263
|
+
Segoe UI:
|
264
|
+
- Regular
|
265
|
+
- Bold
|
266
|
+
Roboto Mono:
|
267
|
+
- Regular
|
268
|
+
```
|
269
|
+
|
270
|
+
Then the command will return the following YAML output:
|
271
|
+
|
272
|
+
```yml
|
273
|
+
$ fontist manifest-locations manifest.yml
|
274
|
+
---
|
275
|
+
Segoe UI:
|
276
|
+
Regular:
|
277
|
+
- "/Users/user/.fontist/fonts/SEGOEUI.TTF"
|
278
|
+
Bold:
|
279
|
+
- "/Users/user/.fontist/fonts/SEGOEUIB.TTF"
|
280
|
+
Roboto Mono:
|
281
|
+
Regular: []
|
282
|
+
```
|
283
|
+
|
284
|
+
Since Segoe UI is installed, but Roboto Mono is not.
|
285
|
+
|
286
|
+
#### Install from manifest
|
287
|
+
|
288
|
+
Install fonts from a YAML manifest:
|
289
|
+
|
290
|
+
```yml
|
291
|
+
$ fontist manifest-install --confirm-license manifest.yml
|
292
|
+
---
|
293
|
+
Segoe UI:
|
294
|
+
Regular:
|
295
|
+
- "/Users/user/.fontist/fonts/SEGOEUI.TTF"
|
296
|
+
Bold:
|
297
|
+
- "/Users/user/.fontist/fonts/SEGOEUIB.TTF"
|
298
|
+
Roboto Mono:
|
299
|
+
Regular:
|
300
|
+
- "/Users/user/.fontist/fonts/RobotoMono-VariableFont_wght.ttf"
|
301
|
+
```
|
302
|
+
|
303
|
+
#### Help
|
304
|
+
|
305
|
+
List of all commands could be seen by:
|
306
|
+
|
307
|
+
```
|
308
|
+
fontist help
|
309
|
+
```
|
310
|
+
|
127
311
|
## Development
|
128
312
|
|
129
313
|
We are following Sandi Metz's Rules for this gem, you can read the
|
@@ -151,6 +335,44 @@ Run the test suite
|
|
151
335
|
bin/rspec
|
152
336
|
```
|
153
337
|
|
338
|
+
### Formulas storage
|
339
|
+
|
340
|
+
All formulas are kept in the [formulas][fontist-formulas] repository. If you'd
|
341
|
+
like to add a new one or change any existing, please refer to its documentation.
|
342
|
+
|
343
|
+
### Auto-generate a formula
|
344
|
+
|
345
|
+
A formula could be generated from a fonts archive. Just specify a URL to the
|
346
|
+
archive:
|
347
|
+
|
348
|
+
```sh
|
349
|
+
fontist create-formula https://www.latofonts.com/download/lato2ofl-zip/
|
350
|
+
cp lato.yml ~/.fontist/formulas/Formulas/
|
351
|
+
cd ~/.fontist/formulas
|
352
|
+
git add Formulas/lato.yml
|
353
|
+
git commit -m "Add Lato formula"
|
354
|
+
```
|
355
|
+
|
356
|
+
### Google Import
|
357
|
+
|
358
|
+
The library contains formulas for [Google Foonts][google-fonts]. A GHA workflow
|
359
|
+
checks for fonts update every day. In case an update is found, it could be
|
360
|
+
fetched to the library by:
|
361
|
+
|
362
|
+
```
|
363
|
+
bin/import_google
|
364
|
+
```
|
365
|
+
|
366
|
+
The script would update formulas which should be committed to a separate
|
367
|
+
repository [formulas][fontist-formulas]:
|
368
|
+
|
369
|
+
```
|
370
|
+
cd ~/.fontist/formulas
|
371
|
+
git add Formulas/google
|
372
|
+
git commit -m "Google Fonts update"
|
373
|
+
git push
|
374
|
+
```
|
375
|
+
|
154
376
|
## Contributing
|
155
377
|
|
156
378
|
First, thank you for contributing! We love pull requests from everyone. By
|
@@ -177,3 +399,5 @@ This gem is developed, maintained and funded by [Ribose Inc.][riboseinc]
|
|
177
399
|
[issues]: https://github.com/fontist/fontist/issues
|
178
400
|
[squash]: https://github.com/thoughtbot/guides/tree/master/protocol/git#write-a-feature
|
179
401
|
[sandi-metz]: http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers
|
402
|
+
[fontist-formulas]: https://github.com/fontist/formulas
|
403
|
+
[google-fonts]: https://fonts.google.com
|
data/bin/check_google
ADDED
data/bin/fontist
ADDED
data/bin/import_google
ADDED
data/fontist.gemspec
CHANGED
@@ -13,20 +13,35 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "https://github.com/fontist/fontist"
|
14
14
|
spec.license = "BSD-2-Clause"
|
15
15
|
|
16
|
+
spec.post_install_message = "Please run `fontist update` to fetch formulas"
|
17
|
+
|
16
18
|
spec.metadata["homepage_uri"] = spec.homepage
|
17
19
|
spec.metadata["source_code_uri"] = "https://github.com/fontist/fontist"
|
18
20
|
spec.metadata["changelog_uri"] = "https://github.com/fontist/fontist"
|
19
21
|
|
20
22
|
spec.require_paths = ["lib"]
|
21
|
-
spec.files = `git ls-files`.split("\
|
23
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
24
|
+
f.match(%r{^(test|spec|features)/})
|
25
|
+
end
|
26
|
+
spec.bindir = "bin"
|
27
|
+
spec.executables = ["fontist"]
|
22
28
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
23
29
|
|
24
30
|
spec.add_runtime_dependency "down", "~> 5.0"
|
25
31
|
spec.add_runtime_dependency "libmspack", "~> 0.1.0"
|
26
32
|
spec.add_runtime_dependency "rubyzip", "~> 2.3.0"
|
33
|
+
spec.add_runtime_dependency "seven_zip_ruby", "~> 1.0"
|
34
|
+
spec.add_runtime_dependency "ruby-ole", "~> 1.0"
|
35
|
+
spec.add_runtime_dependency "thor", "~> 1.0.1"
|
36
|
+
spec.add_runtime_dependency "git", "~> 1.0"
|
27
37
|
|
38
|
+
spec.add_development_dependency "extract_ttc", "~> 0.1"
|
28
39
|
spec.add_development_dependency "pry"
|
29
40
|
spec.add_development_dependency "bundler", "~> 2.0"
|
30
41
|
spec.add_development_dependency "rake", "~> 12.3.3"
|
31
42
|
spec.add_development_dependency "rspec", "~> 3.0"
|
43
|
+
spec.add_development_dependency "rubocop", "0.75.0"
|
44
|
+
spec.add_development_dependency "rubocop-rails"
|
45
|
+
spec.add_development_dependency "rubocop-performance"
|
46
|
+
spec.add_development_dependency "ruby-protocol-buffers", "~> 1.0"
|
32
47
|
end
|
data/lib/fontist.rb
CHANGED
@@ -12,8 +12,14 @@ require "fontist/registry"
|
|
12
12
|
require "fontist/formulas"
|
13
13
|
require "fontist/formula"
|
14
14
|
require "fontist/system_font"
|
15
|
+
require "fontist/fontist_font"
|
16
|
+
require "fontist/manifest"
|
15
17
|
|
16
18
|
module Fontist
|
19
|
+
def self.ui
|
20
|
+
Fontist::Utils::UI
|
21
|
+
end
|
22
|
+
|
17
23
|
def self.lib_path
|
18
24
|
Fontist.root_path.join("lib")
|
19
25
|
end
|
@@ -30,19 +36,23 @@ module Fontist
|
|
30
36
|
Fontist.fontist_path.join("fonts")
|
31
37
|
end
|
32
38
|
|
39
|
+
def self.formulas_repo_path
|
40
|
+
Fontist.fontist_path.join("formulas")
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.formulas_repo_url
|
44
|
+
"https://github.com/fontist/formulas.git"
|
45
|
+
end
|
46
|
+
|
33
47
|
def self.formulas_path
|
34
|
-
Fontist.
|
48
|
+
Fontist.formulas_repo_path.join("Formulas")
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.downloads_path
|
52
|
+
Fontist.fontist_path.join("downloads")
|
35
53
|
end
|
36
|
-
end
|
37
54
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
# then require thos as we go.
|
43
|
-
#
|
44
|
-
# There is a caviat, since the `Dir` method depends on absoulate path
|
45
|
-
# so moving this loading up or somewhere else might not always ensure
|
46
|
-
# the fontist related path helpers.
|
47
|
-
#
|
48
|
-
Dir[Fontist.formulas_path.join("**.rb").to_s].sort.each { |file| require file }
|
55
|
+
def self.system_file_path
|
56
|
+
Fontist.lib_path.join("fontist", "system.yml")
|
57
|
+
end
|
58
|
+
end
|