c12-commons 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,6 +19,14 @@ module C12
19
19
  # @param size size for the font. This parameter defaults to 10pt.
20
20
  def change_font(font = :default, size = 10)
21
21
  case font.to_s
22
+ when 'default'
23
+ ff = 'DejaVuSans'
24
+ when 'bold'
25
+ ff = 'DejaVuSans-Bold'
26
+ when 'italic'
27
+ ff = 'DejaVuSans-Oblique'
28
+ when 'bold-italic'
29
+ ff = 'DejaVuSans-BoldOblique'
22
30
  when 'serif'
23
31
  ff = 'DejaVuSerif'
24
32
  when 'serif-italic'
@@ -28,7 +36,7 @@ module C12
28
36
  when 'serif-bold-italic'
29
37
  ff = 'DejaVuSerif-BoldItalic'
30
38
  else
31
- ff = 'Arial Unicode'
39
+ ff = 'DejaVuSans'
32
40
  end
33
41
  #pdf.font "#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf"
34
42
  self.font File.expand_path("../pdf-assets/#{ff}.ttf", __FILE__), :size => size
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module C12
3
3
  module Commons
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c12-commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-07 00:00:00.000000000 Z
12
+ date: 2012-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70314126813520 !ruby/object:Gem::Requirement
16
+ requirement: &85334950 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '2'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70314126813520
24
+ version_requirements: *85334950
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: simplecov
27
- requirement: &70314126828540 !ruby/object:Gem::Requirement
27
+ requirement: &85334750 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70314126828540
35
+ version_requirements: *85334750
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: actionpack
38
- requirement: &70314126826520 !ruby/object:Gem::Requirement
38
+ requirement: &85334480 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '3'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70314126826520
46
+ version_requirements: *85334480
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: prawn
49
- requirement: &70314126825360 !ruby/object:Gem::Requirement
49
+ requirement: &85334230 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0.12'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70314126825360
57
+ version_requirements: *85334230
58
58
  description: Simple functionality used in my projects
59
59
  email:
60
60
  - dimitri@c12.ge
@@ -71,7 +71,10 @@ files:
71
71
  - lib/c12-commons.rb
72
72
  - lib/c12-commons/core.rb
73
73
  - lib/c12-commons/ka.rb
74
- - lib/c12-commons/pdf-assets/Arial Unicode.ttf
74
+ - lib/c12-commons/pdf-assets/DejaVuSans-Bold.ttf
75
+ - lib/c12-commons/pdf-assets/DejaVuSans-BoldOblique.ttf
76
+ - lib/c12-commons/pdf-assets/DejaVuSans-Oblique.ttf
77
+ - lib/c12-commons/pdf-assets/DejaVuSans.ttf
75
78
  - lib/c12-commons/pdf-assets/DejaVuSerif-Bold.ttf
76
79
  - lib/c12-commons/pdf-assets/DejaVuSerif-BoldItalic.ttf
77
80
  - lib/c12-commons/pdf-assets/DejaVuSerif-Italic.ttf
@@ -103,14 +106,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
106
  version: '0'
104
107
  requirements: []
105
108
  rubyforge_project: c12-commons
106
- rubygems_version: 1.8.15
109
+ rubygems_version: 1.8.13
107
110
  signing_key:
108
111
  specification_version: 3
109
112
  summary: Simple functions
110
- test_files:
111
- - spec/c12-commons/core_spec.rb
112
- - spec/c12-commons/date_spec.rb
113
- - spec/c12-commons/number_spec.rb
114
- - spec/c12-commons/pdf_spec.rb
115
- - spec/spec_helper.rb
113
+ test_files: []
116
114
  has_rdoc: