fontcustom 1.3.7 → 1.3.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07fe620667f4b198f8932d4d292b8173750041ec
4
- data.tar.gz: 0a27e24f0f58a26536944252b0f0de451609be2e
3
+ metadata.gz: 1de556a5e3246945f433c7553625791242421dd1
4
+ data.tar.gz: 31f207332430a7f094ddfe9ff8d5ee807efce082
5
5
  SHA512:
6
- metadata.gz: 3d88ed9b44deefc17413178e3b0a7c7a56dde9b916fcf0685911514e03758f49c1c0c83bc66aa6f5d7ac51aef58789726c7aa2c4ac3d6f12c4dc643edefdd2aa
7
- data.tar.gz: dcb22b7c462e32216cd4c7f15be86a57f7e8d0588c7072ab28478e9031b006e73c5cea9dcadb2204d4a4a41122052be8003794b08f35a0ed00a0677f0a848668
6
+ metadata.gz: 5285a580ad2f2613dbc1eb131b4aa6bd818232c20472fda176b534a36a8f396b1389c2c365d2dd391b515821b9f9576decca61f3cb276996000430a0b6209697
7
+ data.tar.gz: a4545ac14e0b59216fe08ef6e477b6c99697c293036cca868ca5a2a4cebfd7c9e9d459f51b05def361fb85970a7749a341ff374c128e3725efbe35d69e09e49c
@@ -100,7 +100,7 @@ module Fontcustom
100
100
  end
101
101
 
102
102
  if packaged.include?(base) && @options[:font_name] != DEFAULT_OPTIONS[:font_name]
103
- target.sub! DEFAULT_OPTIONS[:font_name], @options[:font_name]
103
+ target = File.join(File.dirname(target), File.basename(target).sub(DEFAULT_OPTIONS[:font_name], @options[:font_name]))
104
104
  end
105
105
 
106
106
  target
@@ -79,6 +79,10 @@ def createGlyph( name, source, code ):
79
79
  glyph.left_side_bearing = glyph.left_side_bearing - shift
80
80
  glyph.right_side_bearing = glyph.right_side_bearing + shift
81
81
 
82
+ # Add valid space glyph to avoid "unknown character" box on IE11
83
+ glyph = font.createChar(32)
84
+ glyph.width = 200
85
+
82
86
  for glyph, data in manifest['glyphs'].iteritems():
83
87
  name = createGlyph(glyph, data['source'], data['codepoint'])
84
88
 
@@ -88,9 +88,9 @@
88
88
  # The em size. Setting this will scale the entire font to the given size.
89
89
  #font_em: 512
90
90
 
91
- # The font's descent and descent. Used to calculate the baseline.
91
+ # The font's ascent and descent. Used to calculate the baseline.
92
92
  #font_ascent: 448
93
93
  #font_descent: 64
94
94
 
95
95
  # Horizontally fit glyphs to their individual vector widths.
96
- #autowidth: true
96
+ #autowidth: false
@@ -1,3 +1,3 @@
1
1
  module Fontcustom
2
- VERSION = "1.3.7"
2
+ VERSION = "1.3.8"
3
3
  end
@@ -48,7 +48,8 @@ module Fontcustom
48
48
  @listener.start
49
49
  else
50
50
  if listen_eq2
51
- @listener.start.join
51
+ @listener.start
52
+ sleep
52
53
  else
53
54
  @listener.start!
54
55
  end
@@ -96,4 +96,21 @@ describe Fontcustom::Generator::Template do
96
96
  expect(gen.send(:font_face)).to match("x-font-woff")
97
97
  end
98
98
  end
99
+
100
+ context ".get_target_path" do
101
+ it "should generate the correct preview target when using default font_name" do
102
+ gen = Fontcustom::Generator::Template.new fixture("generators/.fontcustom-manifest.json")
103
+ options = gen.instance_variable_get :@options
104
+ options[:output] = {:fonts => fixture("sandbox/test/fonts"), :preview => fixture("sandbox/test")}
105
+ expect(gen.send(:get_target_path, "sandbox/test/fontcustom-preview.html")).to match("/sandbox/test/fontcustom-preview.html")
106
+ end
107
+ it "should generate the correct preview target when using custom font_name with output directory containing 'fontcustom'" do
108
+ gen = Fontcustom::Generator::Template.new fixture("generators/.fontcustom-manifest.json")
109
+ options = gen.instance_variable_get :@options
110
+ options[:font_name] = 'custom'
111
+ options[:output] = {:fonts => fixture("sandbox/test-fontcustom/fonts"), :preview => fixture("sandbox/test-fontcustom")}
112
+ expect(gen.send(:get_target_path, "sandbox/test/fontcustom-preview.html")).to match("/sandbox/test-fontcustom/custom-preview.html")
113
+ end
114
+ end
115
+
99
116
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fontcustom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.7
4
+ version: 1.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kai Zau
@@ -9,96 +9,96 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-25 00:00:00.000000000 Z
12
+ date: 2015-02-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.4'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.4'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: thor
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0.14'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0.14'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: listen
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '1.0'
49
- - - <
49
+ - - "<"
50
50
  - !ruby/object:Gem::Version
51
51
  version: '3.0'
52
52
  type: :runtime
53
53
  prerelease: false
54
54
  version_requirements: !ruby/object:Gem::Requirement
55
55
  requirements:
56
- - - '>='
56
+ - - ">="
57
57
  - !ruby/object:Gem::Version
58
58
  version: '1.0'
59
- - - <
59
+ - - "<"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.0'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rake
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: bundler
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  type: :development
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  - !ruby/object:Gem::Dependency
91
91
  name: rspec
92
92
  requirement: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 3.1.0
97
97
  type: :development
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 3.1.0
104
104
  description: Font Custom makes using vector icons easy. Generate icon fonts and supporting
@@ -111,8 +111,8 @@ executables:
111
111
  extensions: []
112
112
  extra_rdoc_files: []
113
113
  files:
114
- - .gitignore
115
- - .travis.yml
114
+ - ".gitignore"
115
+ - ".travis.yml"
116
116
  - CHANGELOG.md
117
117
  - CONTRIBUTING.md
118
118
  - Gemfile
@@ -186,24 +186,24 @@ files:
186
186
  homepage: http://fontcustom.com
187
187
  licenses: []
188
188
  metadata: {}
189
- post_install_message: '>> Thanks for installing Font Custom! Please ensure that fontforge
190
- is installed before compiling any icons. Visit <http://fontcustom.com> for instructions.'
189
+ post_install_message: ">> Thanks for installing Font Custom! Please ensure that fontforge
190
+ is installed before compiling any icons. Visit <http://fontcustom.com> for instructions."
191
191
  rdoc_options: []
192
192
  require_paths:
193
193
  - lib
194
194
  required_ruby_version: !ruby/object:Gem::Requirement
195
195
  requirements:
196
- - - '>='
196
+ - - ">="
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0'
199
199
  required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - '>='
201
+ - - ">="
202
202
  - !ruby/object:Gem::Version
203
203
  version: '0'
204
204
  requirements: []
205
205
  rubyforge_project:
206
- rubygems_version: 2.1.9
206
+ rubygems_version: 2.4.5
207
207
  signing_key:
208
208
  specification_version: 4
209
209
  summary: Generate icon fonts from the command line.