cheapredwine 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,22 +0,0 @@
1
- require 'cheapredwine/ttx/extractor'
2
-
3
- include CheapRedWine::TTX
4
-
5
- describe Extractor do
6
- before do
7
- font_file = File.new('spec/fixtures/extractor/hobo.otf')
8
- @extractor = Extractor.new(font_file, 'spec/fixtures/extractor')
9
- end
10
-
11
- after do
12
- File.delete('spec/fixtures/extractor/hobo.ttx')
13
- end
14
-
15
- it "converts font files to readable ttx file" do
16
- File.exist?('spec/fixtures/extractor/hobo.ttx').should be true
17
- end
18
-
19
- it "has a reference to the ttx file" do
20
- @extractor.ttx_file.path.should eq 'spec/fixtures/extractor/hobo.ttx'
21
- end
22
- end
@@ -1,18 +0,0 @@
1
- require 'cheapredwine/ttx/parser'
2
-
3
- include CheapRedWine::TTX
4
-
5
- describe Parser do
6
- let(:file) { File.open('spec/fixtures/parser/hobo.ttx') }
7
- let(:ttx) { Parser.new(file) }
8
-
9
- it "parses a list of opentype features from ttx files" do
10
- ttx.features.should eq ["kern", "size", "aalt", "frac", "liga", "ordn", "sups"]
11
- end
12
-
13
- it "parses attributes" do
14
- ttx.family_name.should eq "Hobo Std"
15
- ttx.font_name.should eq "Hobo Std Medium"
16
- ttx.style.should eq "Regular"
17
- end
18
- end
data/spec/ttx_spec.rb DELETED
@@ -1,23 +0,0 @@
1
- require 'cheapredwine/ttx'
2
-
3
- include CheapRedWine
4
-
5
- describe TTX do
6
- it "has configuration options" do
7
- TTX.configure do |config|
8
- config.output_folder = 'spec/fixtures/ttx'
9
- end
10
-
11
- TTX.configuration.output_folder.should eq 'spec/fixtures/ttx'
12
- end
13
-
14
- it "generates a ttx parser from a font file" do
15
- font = File.new('spec/fixtures/ttx/hobo.otf')
16
- TTX.configuration.output_folder = 'spec/fixtures/ttx'
17
-
18
- parser = TTX.for_font(font)
19
- parser.class.should eq TTX::Parser
20
-
21
- parser.family_name.should eq "Hobo Std"
22
- end
23
- end