afm 1.0.0 → 1.0.1

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.
data/test/helper.rb DELETED
@@ -1,4 +0,0 @@
1
- require "rubygems"
2
- require "bundler/setup"
3
- require "minitest/autorun"
4
- require "afm"
data/test/test_afm.rb DELETED
@@ -1,30 +0,0 @@
1
- require "helper"
2
-
3
- class TestAfm < Minitest::Test
4
- def setup
5
- @font = AFM::Font.new(File.join(File.dirname(__FILE__), "fixtures", "Vera.afm"))
6
- end
7
-
8
- def test_should_set_metadata
9
- assert_equal "BitstreamVeraSans-Roman", @font.metadata["FontName"]
10
- assert_equal "BitstreamVeraSans-Roman", @font["FontName"]
11
- end
12
-
13
- def test_should_set_char_metrics
14
- assert_equal 400, @font.char_metrics["exclam"][:wx]
15
- assert_equal [85, -131, 310, 758], @font.char_metrics["parenleft"][:boundingbox]
16
- end
17
-
18
- def test_should_set_char_metrics_by_code
19
- assert_equal 400, @font.char_metrics_by_code[33][:wx]
20
- assert_equal [85, -131, 310, 758], @font.char_metrics_by_code[40][:boundingbox]
21
- end
22
-
23
- def test_should_get_char_metrics_by_char
24
- assert_equal 400, @font.metrics_for("!")[:wx]
25
- end
26
-
27
- def test_open_font_with_alternative_method
28
- assert !AFM::Font.from_file(File.join(File.dirname(__FILE__), "fixtures", "Vera.afm")).nil?
29
- end
30
- end