fontist 1.8.12 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/metanorma.yml +35 -0
- data/.github/workflows/rspec.yml +2 -12
- data/README.md +83 -7
- data/fontist.gemspec +1 -1
- data/lib/fontist.rb +51 -5
- data/lib/fontist/cli.rb +45 -4
- data/lib/fontist/errors.rb +20 -0
- data/lib/fontist/font.rb +10 -5
- data/lib/fontist/font_installer.rb +3 -2
- data/lib/fontist/formula.rb +2 -7
- data/lib/fontist/import/formula_builder.rb +5 -1
- data/lib/fontist/import/google_import.rb +4 -0
- data/lib/fontist/import/otf/font_file.rb +12 -3
- data/lib/fontist/import/otf_style.rb +10 -2
- data/lib/fontist/import/otfinfo/template.erb +6 -0
- data/lib/fontist/index.rb +37 -1
- data/lib/fontist/indexes/base_index.rb +12 -2
- data/lib/fontist/indexes/default_family_font_index.rb +21 -0
- data/lib/fontist/indexes/font_index.rb +8 -13
- data/lib/fontist/indexes/preferred_family_font_index.rb +24 -0
- data/lib/fontist/repo.rb +60 -0
- data/lib/fontist/repo_cli.rb +51 -0
- data/lib/fontist/system_font.rb +6 -11
- data/lib/fontist/system_index.rb +110 -27
- data/lib/fontist/update.rb +64 -0
- data/lib/fontist/utils/downloader.rb +14 -2
- data/lib/fontist/utils/locking.rb +1 -0
- data/lib/fontist/version.rb +1 -1
- metadata +11 -6
- data/lib/fontist/fontist_font.rb +0 -24
data/lib/fontist/fontist_font.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
module Fontist
|
2
|
-
class FontistFont
|
3
|
-
def initialize(font_name:)
|
4
|
-
@font_name = font_name
|
5
|
-
end
|
6
|
-
|
7
|
-
def self.find(name)
|
8
|
-
new(font_name: name).find
|
9
|
-
end
|
10
|
-
|
11
|
-
def find
|
12
|
-
styles = FormulaPaths.new(font_paths).find(@font_name)
|
13
|
-
return unless styles
|
14
|
-
|
15
|
-
styles.map { |x| x[:path] }
|
16
|
-
end
|
17
|
-
|
18
|
-
private
|
19
|
-
|
20
|
-
def font_paths
|
21
|
-
Dir.glob(Fontist.fonts_path.join("**"))
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|