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