fontist 0.1.0 → 1.1.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/macosx.yml +30 -0
- data/.github/workflows/ubuntu.yml +2 -2
- data/.github/workflows/windows.yml +32 -0
- data/.gitignore +4 -0
- data/README.md +97 -1
- data/bin/console +2 -5
- data/fontist.gemspec +5 -0
- data/lib/fontist.rb +44 -2
- data/lib/fontist/errors.rb +9 -0
- data/lib/fontist/font.rb +78 -0
- data/lib/fontist/font_formula.rb +123 -0
- data/lib/fontist/formula.rb +90 -0
- data/lib/fontist/formulas.rb +15 -0
- data/lib/fontist/formulas/andale_font.rb +79 -0
- data/lib/fontist/formulas/arial_black_font.rb +78 -0
- data/lib/fontist/formulas/cleartype_fonts.rb +226 -0
- data/lib/fontist/formulas/comic_font.rb +77 -0
- data/lib/fontist/formulas/courier_font.rb +80 -0
- data/lib/fontist/formulas/euphemia_font.rb +85 -0
- data/lib/fontist/formulas/georgia_font.rb +79 -0
- data/lib/fontist/formulas/impact_font.rb +77 -0
- data/lib/fontist/formulas/montserrat_font.rb +132 -0
- data/lib/fontist/formulas/ms_truetype_fonts.rb +124 -0
- data/lib/fontist/formulas/open_sans_fonts.rb +263 -0
- data/lib/fontist/formulas/overpass_font.rb +73 -0
- data/lib/fontist/formulas/source_fonts.rb +109 -0
- data/lib/fontist/formulas/stix_fonts.rb +108 -0
- data/lib/fontist/formulas/tahoma_font.rb +147 -0
- data/lib/fontist/formulas/webding_font.rb +77 -0
- data/lib/fontist/registry.rb +42 -0
- data/lib/fontist/system.yml +17 -0
- data/lib/fontist/system_font.rb +72 -0
- data/lib/fontist/utils.rb +9 -0
- data/lib/fontist/utils/downloader.rb +72 -0
- data/lib/fontist/utils/dsl.rb +77 -0
- data/lib/fontist/utils/exe_extractor.rb +72 -0
- data/lib/fontist/utils/zip_extractor.rb +38 -0
- data/lib/fontist/version.rb +1 -1
- data/spec/fontist/font_formula_spec.rb +67 -0
- data/spec/fontist/font_spec.rb +87 -0
- data/spec/fontist/formula_spec.rb +67 -0
- data/spec/fontist/formulas/andale_font_spec.rb +29 -0
- data/spec/fontist/formulas/arial_black_font_spec.rb +29 -0
- data/spec/fontist/formulas/cleartype_fonts_spec.rb +38 -0
- data/spec/fontist/formulas/comic_font_spec.rb +29 -0
- data/spec/fontist/formulas/courier_font_spec.rb +29 -0
- data/spec/fontist/formulas/euphemia_font_spec.rb +29 -0
- data/spec/fontist/formulas/georgia_font_spec.rb +29 -0
- data/spec/fontist/formulas/impact_font_spec.rb +29 -0
- data/spec/fontist/formulas/montserrat_font_spec.rb +29 -0
- data/spec/fontist/formulas/ms_truetype_fonts_spec.rb +29 -0
- data/spec/fontist/formulas/open_sans_fonts_spec.rb +29 -0
- data/spec/fontist/formulas/overpass_font_spec.rb +29 -0
- data/spec/fontist/formulas/source_fonts_spec.rb +31 -0
- data/spec/fontist/formulas/stix_fonts_spec.rb +29 -0
- data/spec/fontist/formulas/tahoma_font_spec.rb +29 -0
- data/spec/fontist/formulas/webding_font_spec.rb +29 -0
- data/spec/fontist/registry_spec.rb +47 -0
- data/spec/fontist/system_font_spec.rb +44 -0
- data/spec/fontist/utils/downloader_spec.rb +35 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/support/fontist_helper.rb +10 -0
- metadata +113 -2
@@ -0,0 +1,67 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formula do
|
4
|
+
describe ".find" do
|
5
|
+
context "by font name" do
|
6
|
+
it "returns the font formulas" do
|
7
|
+
name = "Calibri"
|
8
|
+
|
9
|
+
clear_type = Fontist::Formula.find(name)
|
10
|
+
|
11
|
+
expect(clear_type.fonts.map(&:name)).to include(name)
|
12
|
+
expect(clear_type.installer).to eq("Fontist::Formulas::ClearTypeFonts")
|
13
|
+
expect(clear_type.description).to include("Microsoft ClearType Fonts")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
context "by exact font" do
|
18
|
+
it "returns the font formulas" do
|
19
|
+
name = "CAMBRIAI.TTF"
|
20
|
+
|
21
|
+
clear_type = Fontist::Formula.find(name)
|
22
|
+
font_files = clear_type.fonts.map { |font| font.styles.map(&:font) }
|
23
|
+
|
24
|
+
expect(font_files.flatten).to include(name)
|
25
|
+
expect(clear_type.installer).to eq("Fontist::Formulas::ClearTypeFonts")
|
26
|
+
expect(clear_type.description).to include("Microsoft ClearType Fonts")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "for invalid font" do
|
31
|
+
it "returns nil to the caller" do
|
32
|
+
name = "Calibri Made Up Name"
|
33
|
+
formulas = Fontist::Formula.find(name)
|
34
|
+
|
35
|
+
expect(formulas).to be_nil
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe ".find_fonts" do
|
41
|
+
it "returns the exact font font names" do
|
42
|
+
name = "Calibri"
|
43
|
+
font = Fontist::Formula.find_fonts(name).last
|
44
|
+
|
45
|
+
expect(font.styles.map(&:font)).to include("CALIBRI.TTF")
|
46
|
+
expect(font.styles.map(&:font)).to include("CALIBRIB.TTF")
|
47
|
+
expect(font.styles.map(&:font)).to include("CALIBRII.TTF")
|
48
|
+
end
|
49
|
+
|
50
|
+
it "returns nil if invalid name provided" do
|
51
|
+
name = "Calibri Invlaid"
|
52
|
+
fonts = Fontist::Formula.find_fonts(name)
|
53
|
+
|
54
|
+
expect(fonts).to be_nil
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe ".all" do
|
59
|
+
it "returns all registered formulas" do
|
60
|
+
formulas = Fontist::Formula.all
|
61
|
+
|
62
|
+
expect(formulas.cleartype.fonts.count).to be > 10
|
63
|
+
expect(formulas.cleartype.homepage).to eq("https://www.microsoft.com")
|
64
|
+
expect(formulas.cleartype.description).to eq("Microsoft ClearType Fonts")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::AndaleFont do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::AndaleFont.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(1)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Andale Mono")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement", slow: true do
|
15
|
+
it "installs the valid fonts", skip_in_windows: true do
|
16
|
+
name = "Andale Mono"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::AndaleFont.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/AndaleMo.TTF")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::ArialBlackFont do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::ArialBlackFont.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(1)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Arial Black")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement", slow: true do
|
15
|
+
it "installs the valid fonts", skip_in_windows: true do
|
16
|
+
name = "Arial Black"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::ArialBlackFont.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/AriBlk.TTF")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::ClearTypeFonts do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::ClearTypeFonts.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(12)
|
9
|
+
expect(formula.fonts[1][:name]).to eq("Cambria Math")
|
10
|
+
expect(formula.fonts.first[:name]).to eq("Cambria")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "installation" do
|
15
|
+
context "with valid licence agreement", slow: true do
|
16
|
+
it "installs the valid fonts", skip_in_windows: true do
|
17
|
+
name = "Calibri"
|
18
|
+
confirmation = "yes"
|
19
|
+
|
20
|
+
paths = Fontist::Formulas::ClearTypeFonts.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(paths.first).to include("fonts/#{name.upcase}.TTF")
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context "with missing licence agreement" do
|
29
|
+
it "raises an Fontist::Errors::LicensingError" do
|
30
|
+
name = "Calibri"
|
31
|
+
|
32
|
+
expect {
|
33
|
+
Fontist::Formulas::ClearTypeFonts.fetch_font(name, confirmation: "no")
|
34
|
+
}.to raise_error(Fontist::Errors::LicensingError)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::ComicFont do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::ComicFont.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(1)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Comic Sans")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement", slow: true do
|
15
|
+
it "installs the valid fonts", skip_in_windows: true do
|
16
|
+
name = "Comic Sans"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::ComicFont.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/Comicbd.TTF")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::CourierFont do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::CourierFont.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(1)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Courier")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement", slow: true do
|
15
|
+
it "installs the valid fonts", skip_in_windows: true do
|
16
|
+
name = "Courier"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::CourierFont.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/cour.ttf")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::EuphemiaFont do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::EuphemiaFont.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(1)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Euphemia UCAS")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement" do
|
15
|
+
it "installs the valid fonts" do
|
16
|
+
name = "Euphemia UCAS"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::EuphemiaFont.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/#{name} Italic 2.6.6.ttf")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::GeorgiaFont do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::GeorgiaFont.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(1)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Georgia")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement", slow: true do
|
15
|
+
it "installs the valid fonts", skip_in_windows: true do
|
16
|
+
name = "Georgia"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::GeorgiaFont.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/Georgiaz.TTF")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::ImpactFont do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::ImpactFont.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(1)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Impact")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement", slow: true do
|
15
|
+
it "installs the valid fonts", skip_in_windows: true do
|
16
|
+
name = "Impact"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::ImpactFont.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/#{name}.TTF")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::MontserratFont do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::MontserratFont.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(2)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Montserrat")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement", slow: true do
|
15
|
+
it "installs the valid fonts" do
|
16
|
+
name = "Montserrat"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::MontserratFont.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/#{name}-Thin.otf")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::MsTruetypeFonts do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::MsTruetypeFonts.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(4)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Arial")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement" do
|
15
|
+
it "installs the valid fonts", skip_in_windows: true do
|
16
|
+
name = "Arial"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::MsTruetypeFonts.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/#{name}.ttf")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::OpenSansFonts do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::OpenSansFonts.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(1)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("OpenSans")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement", slow: true do
|
15
|
+
it "installs the valid fonts" do
|
16
|
+
name = "OpenSans"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::OpenSansFonts.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/#{name}-Light.ttf")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::OverpassFont do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::OverpassFont.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(2)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Overpass")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement" do
|
15
|
+
it "installs the valid fonts" do
|
16
|
+
name = "Overpass"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::OverpassFont.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths.first).to include("fonts/#{name.downcase}-bold-italic.otf")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Fontist::Formulas::SourceFonts do
|
4
|
+
describe "initializing" do
|
5
|
+
it "builds the data dictionary" do
|
6
|
+
formula = Fontist::Formulas::SourceFonts.instance
|
7
|
+
|
8
|
+
expect(formula.fonts.count).to eq(33)
|
9
|
+
expect(formula.fonts.first[:name]).to eq("Source Code Pro")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "installation" do
|
14
|
+
context "with valid licence agreement", slow: true do
|
15
|
+
it "installs the valid fonts" do
|
16
|
+
name = "Source Code Pro"
|
17
|
+
confirmation = "yes"
|
18
|
+
|
19
|
+
stub_fontist_path_to_temp_path
|
20
|
+
paths = Fontist::Formulas::SourceFonts.fetch_font(
|
21
|
+
name, confirmation: confirmation
|
22
|
+
)
|
23
|
+
|
24
|
+
expect(Fontist::Font.find(name)).not_to be_empty
|
25
|
+
expect(paths).to include(
|
26
|
+
Fontist.fonts_path.join("SourceCodePro-Black.ttf").to_s
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|