fontcustom 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: efd1bb1c3cf2ffcac93eb4eae10d08a7c21043b5
4
+ data.tar.gz: 23dd672e77766afbbbf86c6956dc1b186a773c4a
5
+ SHA512:
6
+ metadata.gz: 616614a6418bf68ed0f8c82290244ac0753612d843be5f7f1d3e986805f8e4eba96672c85288349d1b78cbf8cc74529f2b89e19c31a446171c23a80ee813ea55
7
+ data.tar.gz: 0d96d2ac5ad266f077e201420a77992a635e04229353b4f786e106f93d880199f2b0dd02486136dc7d774d7ea1bd8cb4d6e34fc4327ac29f55592fc8580511a6
@@ -17,9 +17,9 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
- gem.add_dependency 'json'
21
- gem.add_dependency 'thor'
22
- gem.add_dependency 'listen'
20
+ gem.add_dependency 'json', '~>1.8.0'
21
+ gem.add_dependency 'thor', '~>0.18.1'
22
+ gem.add_dependency 'listen', '~>1.2.2'
23
23
 
24
24
  gem.add_development_dependency 'rake'
25
25
  gem.add_development_dependency 'bundler'
@@ -66,14 +66,20 @@ module Fontcustom
66
66
 
67
67
  output = `#{cmd}`.split("\n")
68
68
  @json = output[3] # JSON
69
- output = output[4..-1] # Strip fontforge message
69
+ if @json == 'Warning: Font contained no glyphs'
70
+ @json = output[4]
71
+ output = output[5..-1] # Strip fontforge message
72
+ else
73
+ @json = output[3]
74
+ output = output[4..-1] # Strip fontforge message
75
+ end
70
76
 
71
77
  if opts[:debug]
72
78
  shell.say "DEBUG: (raw output from fontforge)"
73
79
  shell.say output
74
80
  end
75
81
 
76
- unless output.empty? # correct output should be []
82
+ unless $?.success?
77
83
  raise Fontcustom::Error, "Compilation failed unexpectedly. Check your options and try again with --debug get more details."
78
84
  end
79
85
  end
@@ -75,15 +75,19 @@ for dirname, dirnames, filenames in os.walk(indir):
75
75
 
76
76
  # glyph.left_side_bearing = KERNING
77
77
  # glyph.right_side_bearing = KERNING
78
- glyph.width = 512
78
+ #glyph.width = 512
79
79
 
80
80
  # possible optimization?
81
81
  # glyph.simplify()
82
82
  # glyph.round()
83
+ glyph.left_side_bearing = glyph.right_side_bearing = 0
84
+ glyph.round()
83
85
 
84
86
  files.append(name)
85
87
  cp += 1
86
88
 
89
+ f.autoWidth(0, 0, 512)
90
+
87
91
  if args.nohash:
88
92
  fontfile = outdir + '/' + args.name
89
93
  else:
@@ -4,7 +4,8 @@ module Fontcustom
4
4
  class Util
5
5
  class << self
6
6
  def check_fontforge
7
- if `which fontforge` == ""
7
+ fontforge = `which fontforge`
8
+ if fontforge == "" || fontforge == "fontforge not found"
8
9
  raise Fontcustom::Error, "Please install fontforge first. Visit http://fontcustom.com for more details."
9
10
  end
10
11
  end
@@ -1,3 +1,3 @@
1
1
  module Fontcustom
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -5,10 +5,7 @@ module Fontcustom
5
5
  class Watcher
6
6
  def initialize(opts)
7
7
  @opts = opts
8
- @listener = Listen.to(@opts[:input])
9
- .relative_paths(true)
10
- .filter(/\.(eps|svg)$/)
11
- .change(&callback)
8
+ @listener = Listen.to(@opts[:input]).relative_paths(true).filter(/\.(eps|svg)$/).change(&callback)
12
9
  @opts[:blocking] = @opts[:blocking] == false ? false : true
13
10
  @listener = @listener.polling_fallback_message(false) unless @opts[:blocking]
14
11
  end
@@ -16,7 +13,12 @@ module Fontcustom
16
13
  def watch
17
14
  puts "Font Custom is watching your icons at #{@opts[:input]}. Press Ctrl + C to stop."
18
15
  compile unless @opts[:skip_first]
19
- @listener.start @opts[:blocking]
16
+
17
+ if @opts[:blocking]
18
+ @listener.start!
19
+ else
20
+ @listener.start
21
+ end
20
22
 
21
23
  rescue Fontcustom::Error => e
22
24
  show_error e
@@ -41,6 +41,7 @@ describe Fontcustom::Watcher do
41
41
  begin
42
42
  w.watch
43
43
  FileUtils.cp fixture("vectors/C.svg"), fixture("vectors/test.svg")
44
+ sleep 2
44
45
  ensure
45
46
  w.stop
46
47
  new = fixture("vectors/test.svg")
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fontcustom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 1.0.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kai Zau
@@ -10,102 +9,90 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-05-15 00:00:00.000000000 Z
12
+ date: 2013-07-21 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: json
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - ~>
21
19
  - !ruby/object:Gem::Version
22
- version: '0'
20
+ version: 1.8.0
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - ~>
29
26
  - !ruby/object:Gem::Version
30
- version: '0'
27
+ version: 1.8.0
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: thor
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - ~>
37
33
  - !ruby/object:Gem::Version
38
- version: '0'
34
+ version: 0.18.1
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - ~>
45
40
  - !ruby/object:Gem::Version
46
- version: '0'
41
+ version: 0.18.1
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: listen
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - ~>
53
47
  - !ruby/object:Gem::Version
54
- version: '0'
48
+ version: 1.2.2
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - ~>
61
54
  - !ruby/object:Gem::Version
62
- version: '0'
55
+ version: 1.2.2
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: rake
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ! '>='
60
+ - - '>='
69
61
  - !ruby/object:Gem::Version
70
62
  version: '0'
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ! '>='
67
+ - - '>='
77
68
  - !ruby/object:Gem::Version
78
69
  version: '0'
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: bundler
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ! '>='
74
+ - - '>='
85
75
  - !ruby/object:Gem::Version
86
76
  version: '0'
87
77
  type: :development
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ! '>='
81
+ - - '>='
93
82
  - !ruby/object:Gem::Version
94
83
  version: '0'
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: rspec
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ! '>='
88
+ - - '>='
101
89
  - !ruby/object:Gem::Version
102
90
  version: '0'
103
91
  type: :development
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ! '>='
95
+ - - '>='
109
96
  - !ruby/object:Gem::Version
110
97
  version: '0'
111
98
  description: Transforms EPS and SVG vectors into icon webfonts. Generates CSS (or
@@ -169,27 +156,26 @@ files:
169
156
  - spec/spec_helper.rb
170
157
  homepage: http://fontcustom.com
171
158
  licenses: []
159
+ metadata: {}
172
160
  post_install_message:
173
161
  rdoc_options: []
174
162
  require_paths:
175
163
  - lib
176
164
  required_ruby_version: !ruby/object:Gem::Requirement
177
- none: false
178
165
  requirements:
179
- - - ! '>='
166
+ - - '>='
180
167
  - !ruby/object:Gem::Version
181
168
  version: '0'
182
169
  required_rubygems_version: !ruby/object:Gem::Requirement
183
- none: false
184
170
  requirements:
185
- - - ! '>='
171
+ - - '>='
186
172
  - !ruby/object:Gem::Version
187
173
  version: '0'
188
174
  requirements: []
189
175
  rubyforge_project:
190
- rubygems_version: 1.8.24
176
+ rubygems_version: 2.0.3
191
177
  signing_key:
192
- specification_version: 3
178
+ specification_version: 4
193
179
  summary: Generate custom icon webfonts from the comfort of the command line.
194
180
  test_files:
195
181
  - spec/fixtures/empty-data/.fontcustom-data