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 +4 -4
- data/lib/fontcustom/generator/template.rb +1 -1
- data/lib/fontcustom/scripts/generate.py +4 -0
- data/lib/fontcustom/templates/fontcustom.yml +2 -2
- data/lib/fontcustom/version.rb +1 -1
- data/lib/fontcustom/watcher.rb +2 -1
- data/spec/fontcustom/generator/template_spec.rb +17 -0
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1de556a5e3246945f433c7553625791242421dd1
|
4
|
+
data.tar.gz: 31f207332430a7f094ddfe9ff8d5ee807efce082
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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:
|
96
|
+
#autowidth: false
|
data/lib/fontcustom/version.rb
CHANGED
data/lib/fontcustom/watcher.rb
CHANGED
@@ -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.
|
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:
|
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:
|
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.
|
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.
|