fontcustom 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +12 -0
- data/CHANGELOG.md +10 -0
- data/CONTRIBUTING.md +19 -6
- data/README.md +57 -22
- data/fontcustom.gemspec +6 -6
- data/lib/fontcustom.rb +3 -2
- data/lib/fontcustom/cli.rb +8 -5
- data/lib/fontcustom/generator/font.rb +9 -8
- data/lib/fontcustom/generator/template.rb +7 -7
- data/lib/fontcustom/options.rb +10 -10
- data/lib/fontcustom/scripts/generate.py +15 -6
- data/lib/fontcustom/templates/fontcustom.yml +16 -14
- data/lib/fontcustom/version.rb +1 -1
- data/spec/fixtures/generators/{.fontcustom-data-corrupted → .fontcustom-manifest-corrupted.json} +0 -0
- data/spec/fixtures/generators/{.fontcustom-data → .fontcustom-manifest.json} +0 -0
- data/spec/fontcustom/generator/font_spec.rb +7 -7
- data/spec/fontcustom/generator/template_spec.rb +5 -5
- data/spec/fontcustom/options_spec.rb +29 -27
- metadata +50 -28
- checksums.yaml +0 -7
data/.travis.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
language: ruby
|
2
|
+
before_install:
|
3
|
+
- sudo apt-get update -qq
|
4
|
+
- sudo apt-get install -qq fontforge
|
5
|
+
- wget http://people.mozilla.com/~jkew/woff/woff-code-latest.zip
|
6
|
+
- unzip woff-code-latest.zip -d sfnt2woff && cd sfnt2woff && make && sudo mv sfnt2woff /usr/local/bin/
|
7
|
+
- bundle
|
8
|
+
rvm:
|
9
|
+
- 2.0.0
|
10
|
+
- 1.9.3
|
11
|
+
- 1.9.2
|
12
|
+
script: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## 1.2.0 (11/2/2013)
|
2
|
+
|
3
|
+
* Preparation for fixed glyph code points.
|
4
|
+
* Tweaks command line options (more semantic aliases)
|
5
|
+
* Renames :data_cache to :manifest
|
6
|
+
* Sets the stage for a more streamlined, predictable workflow
|
7
|
+
* Drops EPS support (was buggy and unused)
|
8
|
+
* Turns glyph width adjustment into an option (off by default) ([#137](https://github.com/FontCustom/fontcustom/pull/137))
|
9
|
+
* Relaxes all dependency version requirements ([#127](https://github.com/FontCustom/fontcustom/issues/127))
|
10
|
+
|
1
11
|
## 1.1.1 (10/16/2013)
|
2
12
|
|
3
13
|
* Preview characters are turned off by default in the preview template.
|
data/CONTRIBUTING.md
CHANGED
@@ -1,14 +1,27 @@
|
|
1
|
-
|
1
|
+
## Help make Font Custom better!
|
2
2
|
|
3
|
-
|
3
|
+
This project was born out of an overheard conversation between two devs in a
|
4
|
+
NYC coffee shop — it's come a long ways thanks to your support.
|
4
5
|
|
5
|
-
|
6
|
+
### Wishlist / Roadmap
|
6
7
|
|
7
|
-
|
8
|
+
* Ruby on Rails integration
|
9
|
+
* Compass integration
|
10
|
+
* Base 64 encode fonts into CSS
|
11
|
+
* Templates for LESS, stylus, etc.
|
12
|
+
* Ligature support
|
13
|
+
* Windows support
|
14
|
+
* Make better use of Thor
|
8
15
|
|
9
|
-
|
16
|
+
### Conventions
|
10
17
|
|
11
|
-
|
18
|
+
We try to follow the [Github ruby styleguide](https://github.com/styleguide/ruby)
|
19
|
+
as much as possible.
|
20
|
+
|
21
|
+
If you catch a typo or a block of code that could be more elegant — please let
|
22
|
+
us know. No such thing as too small of an improvement.
|
23
|
+
|
24
|
+
### Process
|
12
25
|
|
13
26
|
* Visit [issues](https://github.com/FontCustom/fontcustom/issues) for ideas.
|
14
27
|
* Fork the repo.
|
data/README.md
CHANGED
@@ -1,53 +1,76 @@
|
|
1
|
-
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/fontcustom.png)](http://badge.fury.io/rb/fontcustom)
|
2
|
+
[![Build Status](https://api.travis-ci.org/FontCustom/fontcustom.png)](https://travis-ci.org/FontCustom/fontcustom)
|
3
|
+
[![Code Quality](https://codeclimate.com/github/FontCustom/fontcustom.png)](https://codeclimate.com/github/FontCustom/fontcustom)
|
2
4
|
|
3
|
-
|
5
|
+
## Font Custom
|
4
6
|
|
5
|
-
|
7
|
+
**Icon fonts from the command line.**
|
8
|
+
|
9
|
+
Generate cross-browser compatible icon fonts and supporting files (e.g.
|
10
|
+
@font-face CSS) from a collection of SVGs.
|
11
|
+
|
12
|
+
[Documentation](http://fontcustom.com)<br/>
|
6
13
|
[Changelog](https://github.com/FontCustom/fontcustom/blob/master/CHANGELOG.md)<br/>
|
7
|
-
[
|
14
|
+
[Support](https://github.com/FontCustom/fontcustom/issues)<br/>
|
15
|
+
[Contribute!](https://github.com/FontCustom/fontcustom/blob/master/CONTRIBUTING.md)
|
16
|
+
|
17
|
+
### Installation
|
8
18
|
|
9
|
-
|
19
|
+
Requires **Ruby 1.9.2+**, **FontForge** with Python scripting.
|
10
20
|
|
11
21
|
```sh
|
12
|
-
#
|
22
|
+
# On Mac
|
13
23
|
brew install fontforge eot-utils ttfautohint
|
14
24
|
gem install fontcustom
|
25
|
+
|
26
|
+
# On Linux
|
27
|
+
sudo apt-get install fontforge ttfautohint
|
28
|
+
wget http://people.mozilla.com/~jkew/woff/woff-code-latest.zip
|
29
|
+
unzip woff-code-latest.zip -d sfnt2woff && cd sfnt2woff && make && sudo mv sfnt2woff /usr/local/bin/
|
30
|
+
gem install fontcustom
|
15
31
|
```
|
16
32
|
|
17
|
-
|
33
|
+
### Quick Start
|
18
34
|
|
19
35
|
```sh
|
20
36
|
fontcustom compile path/to/vectors # Compiles icons into `fontcustom/`
|
21
37
|
fontcustom watch path/to/vectors # Compiles when vectors are changed/added/removed
|
22
38
|
|
23
39
|
fontcustom compile # Uses configuration options from `fontcustom.yml`
|
24
|
-
fontcustom watch
|
40
|
+
fontcustom watch
|
25
41
|
|
42
|
+
fontcustom config # Generate a blank a configuration file
|
26
43
|
fontcustom help # See all options
|
27
44
|
```
|
28
45
|
|
29
|
-
|
46
|
+
### Configuration
|
30
47
|
|
31
|
-
To
|
48
|
+
To preserve options between compiles, create a configuration file with
|
49
|
+
`fontcustom config`. This should live in the directory where you plan on
|
50
|
+
running `fontcustom` commands.
|
32
51
|
|
33
52
|
```yml
|
34
|
-
#
|
35
|
-
font_name: fontcustom # Names the font
|
36
|
-
|
53
|
+
# General Options (defaults shown)
|
54
|
+
font_name: fontcustom # Names the font and sets the name and directory
|
55
|
+
# of generated files
|
56
|
+
project_root: (pwd) # Context for all relative paths
|
37
57
|
input: (project_root) # Where vectors and templates are located
|
38
58
|
output: (project_root)/(font name) # Where generated files will be saved
|
39
|
-
|
59
|
+
config: (pwd)/fontcustom.yml # Optional path to a configuration file
|
60
|
+
templates: [ css, preview ] # Templates to generate alongside fonts
|
61
|
+
# Possible values: preview, css, scss,
|
62
|
+
# scss-rails, bootstrap, bootstrap-scss,
|
63
|
+
# bootstrap-ie7, bootstrap-ie7-scss
|
40
64
|
css_prefix: icon- # CSS class prefix
|
65
|
+
no_hash: false # Don't add asset-busting hashes
|
41
66
|
preprocessor_path: "" # Font path used in CSS proprocessor templates
|
42
|
-
|
67
|
+
autowidth: false # Automatically size glyphs based on the width of
|
68
|
+
# their individual vectors
|
43
69
|
debug: false # Output raw messages from fontforge
|
44
70
|
quiet: false # Silence all output messages
|
45
|
-
templates: [ css, preview ] # Templates to generate alongside fonts
|
46
|
-
# Possible values: preview, css, scss, scss-rails, bootstrap,
|
47
|
-
# bootstrap-scss, bootstrap-ie7, bootstrap-ie7-scss
|
48
71
|
|
49
|
-
#
|
50
|
-
#
|
72
|
+
# For more control over file locations,
|
73
|
+
# set input and output as Yaml hashes
|
51
74
|
input:
|
52
75
|
vectors: path/to/vectors # required
|
53
76
|
templates: path/to/templates
|
@@ -56,12 +79,24 @@ output:
|
|
56
79
|
fonts: app/assets/fonts # required
|
57
80
|
css: app/assets/stylesheets
|
58
81
|
preview: app/views/styleguide
|
59
|
-
custom-template.yml: custom/path
|
82
|
+
custom-template.yml: custom/path
|
60
83
|
```
|
61
84
|
|
85
|
+
### SVG Recommendations
|
86
|
+
|
87
|
+
All vectors are imported as a single layer with colors and strokes ignored. If
|
88
|
+
you run into trouble, try combining your paths and ensuring that you don't have
|
89
|
+
any white fills (which show up as colored).
|
90
|
+
|
91
|
+
By default, Font Custom scales each vector to fit a 512x512 canvas with a
|
92
|
+
baseline at 448. In practice, that means as long as your SVG `viewBox` is
|
93
|
+
square, icons will look exactly like your SVGs.
|
94
|
+
|
95
|
+
If you set the `autowidth` option, Font Custom will trim the widths of each
|
96
|
+
glyph to the vector width. Heights are unaffected.
|
97
|
+
|
62
98
|
---
|
63
99
|
|
64
|
-
[Contributor Guidelines](https://github.com/FontCustom/fontcustom/blob/master/CONTRIBUTING.md)<br/>
|
65
100
|
[Licenses](https://github.com/FontCustom/fontcustom/blob/master/LICENSES.txt)
|
66
101
|
|
67
102
|
Brought to you by [@endtwist](https://github.com/endtwist) and [@ezYZ](https://github.com/ezYZ)
|
data/fontcustom.gemspec
CHANGED
@@ -8,19 +8,19 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = Fontcustom::VERSION
|
9
9
|
gem.authors = ["Kai Zau", "Joshua Gross"]
|
10
10
|
gem.email = ["kai@kaizau.com", "joshua@gross.is"]
|
11
|
-
gem.summary = "Generate icon
|
12
|
-
gem.description = "
|
11
|
+
gem.summary = "Generate icon fonts from the command line."
|
12
|
+
gem.description = "Font Custom makes using vector icons easy. Generate icon fonts and supporting templates (e.g. @font-face CSS) from a collection of SVGs."
|
13
13
|
gem.homepage = "http://fontcustom.com"
|
14
|
-
gem.post_install_message = "
|
14
|
+
gem.post_install_message = ">> Thanks for installing Font Custom! Please ensure that fontforge is installed before compiling any icons. Visit <http://fontcustom.com> for instructions."
|
15
15
|
|
16
16
|
gem.files = `git ls-files`.split($/)
|
17
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
|
21
|
-
gem.add_dependency "json", "~>1.
|
22
|
-
gem.add_dependency "thor", "~>0.
|
23
|
-
gem.add_dependency "listen", "~>1.
|
21
|
+
gem.add_dependency "json", "~>1.4"
|
22
|
+
gem.add_dependency "thor", "~>0.14"
|
23
|
+
gem.add_dependency "listen", "~>1.0"
|
24
24
|
|
25
25
|
gem.add_development_dependency "rake"
|
26
26
|
gem.add_development_dependency "bundler"
|
data/lib/fontcustom.rb
CHANGED
@@ -29,7 +29,7 @@ module Fontcustom
|
|
29
29
|
:output => "PROJECT_ROOT/FONT_NAME",
|
30
30
|
:config => "PROJECT_ROOT/fontcustom.yml OR PROJECT_ROOT/config/fontcustom.yml",
|
31
31
|
:templates => "css preview",
|
32
|
-
:
|
32
|
+
:manifest => "CONFIG_DIR/.fontcustom-manifest.json OR PROJECT_ROOT/.fontcustom-manifest.json"
|
33
33
|
}
|
34
34
|
|
35
35
|
DEFAULT_OPTIONS = {
|
@@ -40,8 +40,9 @@ module Fontcustom
|
|
40
40
|
:templates => %w|css preview|,
|
41
41
|
:font_name => "fontcustom",
|
42
42
|
:css_prefix => "icon-",
|
43
|
-
:
|
43
|
+
:manifest => nil,
|
44
44
|
:preprocessor_path => nil,
|
45
|
+
:autowidth => false,
|
45
46
|
:no_hash => false,
|
46
47
|
:debug => false,
|
47
48
|
:quiet => false
|
data/lib/fontcustom/cli.rb
CHANGED
@@ -34,17 +34,20 @@ module Fontcustom
|
|
34
34
|
:desc => "Prefix for each glyph's CSS class.",
|
35
35
|
:default => DEFAULT_OPTIONS[:css_prefix]
|
36
36
|
|
37
|
-
class_option :
|
37
|
+
class_option :manifest, :aliases => "-m", :type => :string,
|
38
38
|
:desc => "Path to a manifest of generated files. Used for garbage collection.",
|
39
|
-
:default => EXAMPLE_OPTIONS[:
|
39
|
+
:default => EXAMPLE_OPTIONS[:manifest]
|
40
40
|
|
41
|
-
class_option :preprocessor_path, :aliases => "-
|
41
|
+
class_option :preprocessor_path, :aliases => "-p", :type => :string,
|
42
42
|
:desc => "Optional font path for CSS proprocessor templates."
|
43
43
|
|
44
|
-
class_option :
|
44
|
+
class_option :autowidth, :aliases => "-a", :type => :boolean,
|
45
|
+
:desc => "Auto-size glyphs to their individual vector widths."
|
46
|
+
|
47
|
+
class_option :no_hash, :aliases => "-n", :type => :boolean,
|
45
48
|
:desc => "Generate fonts without asset-busting hashes."
|
46
49
|
|
47
|
-
class_option :debug, :aliases => "-
|
50
|
+
class_option :debug, :aliases => "-d", :type => :boolean,
|
48
51
|
:desc => "Display debugging messages."
|
49
52
|
|
50
53
|
class_option :quiet, :aliases => "-q", :type => :boolean,
|
@@ -23,14 +23,14 @@ module Fontcustom
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
27
|
-
if File.exists? opts.
|
26
|
+
def get_manifest
|
27
|
+
if File.exists? opts.manifest
|
28
28
|
begin
|
29
|
-
data = File.read opts.
|
29
|
+
data = File.read opts.manifest
|
30
30
|
data = JSON.parse(data, :symbolize_names => true) unless data.empty?
|
31
31
|
@data = data.is_a?(Hash) ? symbolize_hash(data) : Fontcustom::DATA_MODEL.dup
|
32
32
|
rescue
|
33
|
-
raise Fontcustom::Error, "Couldn't parse `#{relative_to_root(opts.
|
33
|
+
raise Fontcustom::Error, "Couldn't parse `#{relative_to_root(opts.manifest)}`. Delete it to start from scratch. Any previously generated files will need to be deleted manually."
|
34
34
|
end
|
35
35
|
else
|
36
36
|
@data = Fontcustom::DATA_MODEL.dup
|
@@ -48,13 +48,14 @@ module Fontcustom
|
|
48
48
|
ensure
|
49
49
|
@data[:fonts] = @data[:fonts] - deleted
|
50
50
|
json = JSON.pretty_generate @data
|
51
|
-
overwrite_file opts.
|
51
|
+
overwrite_file opts.manifest, json
|
52
52
|
say_changed :delete, deleted
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
56
|
def generate
|
57
|
-
cmd = "fontforge -script #{Fontcustom.gem_lib}/scripts/generate.py #{opts.input[:vectors]} #{opts.output[:fonts]} --name #{opts.font_name}"
|
57
|
+
cmd = "fontforge -script #{Fontcustom.gem_lib}/scripts/generate.py #{opts.input[:vectors]} #{opts.output[:fonts]} --name #{opts.font_name}"
|
58
|
+
cmd += " --autowidth" if opts.autowidth
|
58
59
|
cmd += " --nohash" if opts.no_hash
|
59
60
|
cmd += " --debug" if opts.debug
|
60
61
|
output, err, status = execute_and_clean(cmd)
|
@@ -76,12 +77,12 @@ module Fontcustom
|
|
76
77
|
|
77
78
|
def save_data
|
78
79
|
json = JSON.pretty_generate @data
|
79
|
-
overwrite_file opts.
|
80
|
+
overwrite_file opts.manifest, json
|
80
81
|
end
|
81
82
|
|
82
83
|
private
|
83
84
|
|
84
|
-
def execute_and_clean
|
85
|
+
def execute_and_clean(cmd)
|
85
86
|
stdout, stderr, status = Open3::capture3(cmd)
|
86
87
|
stdout = stdout.split("\n")
|
87
88
|
stdout = stdout[1..-1] if stdout[0] == "CreateAllPyModules()"
|
@@ -19,14 +19,14 @@ module Fontcustom
|
|
19
19
|
File.join Fontcustom.gem_lib, "templates"
|
20
20
|
end
|
21
21
|
|
22
|
-
def
|
23
|
-
if File.exists? opts.
|
24
|
-
@data = JSON.parse File.read(opts.
|
22
|
+
def get_manifest
|
23
|
+
if File.exists? opts.manifest
|
24
|
+
@data = JSON.parse File.read(opts.manifest), :symbolize_names => true
|
25
25
|
else
|
26
|
-
raise Fontcustom::Error, "`#{relative_to_root(opts.
|
26
|
+
raise Fontcustom::Error, "`#{relative_to_root(opts.manifest)}` is missing. This file is required to generate templates."
|
27
27
|
end
|
28
28
|
rescue
|
29
|
-
raise Fontcustom::Error, "Couldn't parse `#{relative_to_root(opts.
|
29
|
+
raise Fontcustom::Error, "Couldn't parse `#{relative_to_root(opts.manifest)}`. Delete it to start from scratch. Any previously generated files will need to be deleted manually."
|
30
30
|
end
|
31
31
|
|
32
32
|
def reset_output
|
@@ -40,7 +40,7 @@ module Fontcustom
|
|
40
40
|
ensure
|
41
41
|
@data[:templates] = @data[:templates] - deleted
|
42
42
|
json = JSON.pretty_generate @data
|
43
|
-
overwrite_file opts.
|
43
|
+
overwrite_file opts.manifest, json
|
44
44
|
say_changed :delete, deleted
|
45
45
|
end
|
46
46
|
end
|
@@ -88,7 +88,7 @@ module Fontcustom
|
|
88
88
|
say_changed :create, created
|
89
89
|
@data[:templates] = (@data[:templates] + created).uniq
|
90
90
|
json = JSON.pretty_generate @data
|
91
|
-
overwrite_file opts.
|
91
|
+
overwrite_file opts.manifest, json
|
92
92
|
end
|
93
93
|
end
|
94
94
|
end
|
data/lib/fontcustom/options.rb
CHANGED
@@ -8,7 +8,7 @@ module Fontcustom
|
|
8
8
|
class Options
|
9
9
|
include Util
|
10
10
|
|
11
|
-
attr_reader :project_root, :input, :output, :config, :templates, :font_name, :css_prefix, :
|
11
|
+
attr_reader :project_root, :input, :output, :config, :templates, :font_name, :css_prefix, :manifest, :preprocessor_path, :autowidth, :no_hash, :debug, :quiet, :skip_first
|
12
12
|
|
13
13
|
def initialize(options = {})
|
14
14
|
check_fontforge
|
@@ -91,23 +91,23 @@ module Fontcustom
|
|
91
91
|
options = DEFAULT_OPTIONS.dup
|
92
92
|
options = options.merge @config_options
|
93
93
|
options = options.merge symbolize_hash(@cli_options)
|
94
|
-
remove_instance_variable :@config_options
|
95
|
-
remove_instance_variable :@cli_options
|
94
|
+
send :remove_instance_variable, :@config_options
|
95
|
+
send :remove_instance_variable, :@cli_options
|
96
96
|
|
97
97
|
# :config is excluded since it's already been set
|
98
|
-
keys = %w|project_root input output
|
98
|
+
keys = %w|project_root input output manifest templates font_name css_prefix preprocessor_path skip_first autowidth no_hash debug quiet|
|
99
99
|
keys.each { |key| instance_variable_set("@#{key}", options[key.to_sym]) }
|
100
100
|
|
101
101
|
@font_name = @font_name.strip.gsub(/\W/, "-")
|
102
102
|
end
|
103
103
|
|
104
104
|
def set_data_path
|
105
|
-
@
|
106
|
-
expand_path @
|
105
|
+
@manifest = if ! @manifest.nil?
|
106
|
+
expand_path @manifest
|
107
107
|
elsif @config
|
108
|
-
File.join File.dirname(@config), ".fontcustom-
|
108
|
+
File.join File.dirname(@config), ".fontcustom-manifest.json"
|
109
109
|
else
|
110
|
-
File.join @project_root, ".fontcustom-
|
110
|
+
File.join @project_root, ".fontcustom-manifest.json"
|
111
111
|
end
|
112
112
|
end
|
113
113
|
|
@@ -139,8 +139,8 @@ module Fontcustom
|
|
139
139
|
@input = { :vectors => input, :templates => input }
|
140
140
|
end
|
141
141
|
|
142
|
-
if Dir[File.join(@input[:vectors], "*.
|
143
|
-
raise Fontcustom::Error, "`#{relative_to_root(@input[:vectors])}` doesn't contain any
|
142
|
+
if Dir[File.join(@input[:vectors], "*.svg")].empty?
|
143
|
+
raise Fontcustom::Error, "`#{relative_to_root(@input[:vectors])}` doesn't contain any SVGs."
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
@@ -10,6 +10,7 @@ try:
|
|
10
10
|
parser = argparse.ArgumentParser(description='Convert a directory of svg and eps files into a unified font file.')
|
11
11
|
parser.add_argument('dir', metavar='directory', type=unicode, nargs=2, help='directory of vector files')
|
12
12
|
parser.add_argument('--name', metavar='fontname', type=unicode, nargs='?', help='reference name of the font (no spaces)')
|
13
|
+
parser.add_argument('--autowidth', '-a', action='store_true', help='automatically size generated glyphs to their vector width')
|
13
14
|
parser.add_argument('--nohash', '-n', action='store_true', help='disable hash fingerprinting of font files')
|
14
15
|
parser.add_argument('--debug', '-d', action='store_true', help='display debug messages')
|
15
16
|
args = parser.parse_args()
|
@@ -20,6 +21,7 @@ except ImportError:
|
|
20
21
|
import optparse
|
21
22
|
parser = optparse.OptionParser(description='Convert a directory of svg and eps files into a unified font file.')
|
22
23
|
parser.add_option('--name', metavar='fontname', type='string', nargs='?', help='reference name of the font (no spaces)')
|
24
|
+
parser.add_option('--autowidth', '-a', action='store_true', help='automatically size generated glyphs to their vector width')
|
23
25
|
parser.add_option('--nohash', '-n', action='store_true', help='disable hash fingerprinting of font files')
|
24
26
|
parser.add_argument('--debug', '-d', action='store_true', help='display debug messages')
|
25
27
|
(args, posargs) = parser.parse_args()
|
@@ -56,7 +58,7 @@ for dirname, dirnames, filenames in os.walk(indir):
|
|
56
58
|
# replace the <switch> </switch> tags with 'nothing'
|
57
59
|
svgtext = svgtext.replace('<switch>', '')
|
58
60
|
svgtext = svgtext.replace('</switch>', '')
|
59
|
-
|
61
|
+
|
60
62
|
tmpsvgfile.file.write(svgtext)
|
61
63
|
|
62
64
|
svgfile.close()
|
@@ -64,7 +66,7 @@ for dirname, dirnames, filenames in os.walk(indir):
|
|
64
66
|
|
65
67
|
filePath = tmpsvgfile.name
|
66
68
|
# end hack
|
67
|
-
|
69
|
+
|
68
70
|
m.update(filename + str(size) + ';')
|
69
71
|
glyph = f.createChar(cp)
|
70
72
|
glyph.importOutlines(filePath)
|
@@ -75,18 +77,25 @@ for dirname, dirnames, filenames in os.walk(indir):
|
|
75
77
|
|
76
78
|
# glyph.left_side_bearing = KERNING
|
77
79
|
# glyph.right_side_bearing = KERNING
|
78
|
-
#glyph.width = 512
|
79
80
|
|
80
81
|
# possible optimization?
|
81
82
|
# glyph.simplify()
|
82
83
|
# glyph.round()
|
83
|
-
|
84
|
-
glyph
|
84
|
+
|
85
|
+
# set glyph size explicitly or automatically depending on autowidth
|
86
|
+
if args.autowidth:
|
87
|
+
glyph.left_side_bearing = glyph.right_side_bearing = 0
|
88
|
+
glyph.round()
|
89
|
+
else:
|
90
|
+
# force a manual size when autowidth is disabled
|
91
|
+
glyph.width = 512
|
85
92
|
|
86
93
|
files.append(name)
|
87
94
|
cp += 1
|
88
95
|
|
89
|
-
|
96
|
+
# resize glyphs if autowidth is enabled
|
97
|
+
if args.autowidth:
|
98
|
+
f.autoWidth(0, 0, 512)
|
90
99
|
|
91
100
|
if args.nohash:
|
92
101
|
fontfile = outdir + '/' + args.name
|
@@ -1,44 +1,46 @@
|
|
1
|
-
#
|
1
|
+
# --------------------------------------------------------------------------- #
|
2
2
|
# Project Info
|
3
3
|
# Default values shown. Learn more about these options by running
|
4
|
-
# `fontcustom help` or
|
5
|
-
#
|
4
|
+
# `fontcustom help` or visiting <http://fontcustom.com>.
|
5
|
+
# --------------------------------------------------------------------------- #
|
6
6
|
|
7
7
|
#font_name: fontcustom
|
8
8
|
#css_prefix: icon-
|
9
9
|
#preprocessor_path: ""
|
10
|
+
#autowidth: false
|
10
11
|
#no_hash: false
|
11
12
|
#debug: false
|
12
13
|
#quiet: false
|
13
14
|
|
14
15
|
|
15
|
-
#
|
16
|
+
# --------------------------------------------------------------------------- #
|
16
17
|
# Project Paths
|
17
|
-
# Relative paths are expanded from PROJECT_ROOT (
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
18
|
+
# Relative paths are expanded from PROJECT_ROOT (defaults to the directory
|
19
|
+
# where the fontcustom command is run). INPUT and OUTPUT can be strings or
|
20
|
+
# hashes or file types / names.
|
21
|
+
# --------------------------------------------------------------------------- #
|
21
22
|
|
22
23
|
#project_root: some/other/place
|
23
|
-
#
|
24
|
+
#manifest: tmp/fontcustom
|
24
25
|
|
25
26
|
#input:
|
26
|
-
# vectors: app/assets/fonts/fontcustom/vectors
|
27
|
+
# vectors: app/assets/fonts/fontcustom/vectors # required
|
27
28
|
# templates: app/assets/fonts/fontcustom/templates
|
28
29
|
|
29
30
|
#output:
|
30
|
-
# fonts: app/assets/fonts
|
31
|
+
# fonts: app/assets/fonts # required
|
31
32
|
# css: app/assets/stylesheets
|
32
33
|
# preview: app/views/styleguide
|
33
34
|
# my-custom-template.yml: config
|
34
35
|
|
35
36
|
|
36
|
-
#
|
37
|
+
# --------------------------------------------------------------------------- #
|
37
38
|
# Templates
|
38
39
|
# Included in Font Custom:
|
39
40
|
# preview, css, scss, scss-rails, bootstrap, bootstrap-scss, bootstrap-ie7,
|
40
41
|
# bootstrap-ie7-scss
|
41
|
-
# Custom templates should be saved in the INPUT[:templates] directory
|
42
|
-
#
|
42
|
+
# Custom templates should be saved in the INPUT[:templates] directory and
|
43
|
+
# referenced by their base file name.
|
44
|
+
# --------------------------------------------------------------------------- #
|
43
45
|
|
44
46
|
#templates: [ scss, preview, my-custom-template.yml ]
|
data/lib/fontcustom/version.rb
CHANGED
data/spec/fixtures/generators/{.fontcustom-data-corrupted → .fontcustom-manifest-corrupted.json}
RENAMED
File without changes
|
File without changes
|
@@ -40,7 +40,7 @@ describe Fontcustom::Generator::Font do
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
context "#
|
43
|
+
context "#get_manifest" do
|
44
44
|
it "should assign empty data model if data file is empty or missing" do
|
45
45
|
options = {
|
46
46
|
:project_root => fixture,
|
@@ -48,7 +48,7 @@ describe Fontcustom::Generator::Font do
|
|
48
48
|
:quiet => true
|
49
49
|
}
|
50
50
|
gen = generator options
|
51
|
-
gen.
|
51
|
+
gen.get_manifest
|
52
52
|
data = gen.instance_variable_get("@data")
|
53
53
|
data.should == Fontcustom::DATA_MODEL
|
54
54
|
end
|
@@ -62,7 +62,7 @@ describe Fontcustom::Generator::Font do
|
|
62
62
|
:quiet => true
|
63
63
|
}
|
64
64
|
gen = generator options
|
65
|
-
gen.
|
65
|
+
gen.get_manifest
|
66
66
|
data = gen.instance_variable_get("@data")
|
67
67
|
data.should_not == Fontcustom::DATA_MODEL
|
68
68
|
end
|
@@ -71,13 +71,13 @@ describe Fontcustom::Generator::Font do
|
|
71
71
|
options = {
|
72
72
|
:project_root => fixture,
|
73
73
|
:config => "generators",
|
74
|
-
:
|
74
|
+
:manifest => "generators/.fontcustom-manifest-corrupted.json",
|
75
75
|
:input => "shared/vectors",
|
76
76
|
:output => "mixed-output",
|
77
77
|
:quiet => true
|
78
78
|
}
|
79
79
|
gen = generator options
|
80
|
-
expect { gen.
|
80
|
+
expect { gen.get_manifest }.to raise_error Fontcustom::Error, /corrupted/
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
@@ -114,7 +114,7 @@ describe Fontcustom::Generator::Font do
|
|
114
114
|
end
|
115
115
|
|
116
116
|
it "should update the data file" do
|
117
|
-
file = fixture(".fontcustom-
|
117
|
+
file = fixture(".fontcustom-manifest.json")
|
118
118
|
subject.should_receive(:overwrite_file).once.with(file, /"fonts":/)
|
119
119
|
subject.reset_output
|
120
120
|
end
|
@@ -219,7 +219,7 @@ describe Fontcustom::Generator::Font do
|
|
219
219
|
)
|
220
220
|
gen.stub :overwrite_file
|
221
221
|
gen.instance_variable_set(:@data, data_file_contents)
|
222
|
-
file = File.join fixture(".fontcustom-
|
222
|
+
file = File.join fixture(".fontcustom-manifest.json")
|
223
223
|
gen.should_receive(:overwrite_file).once.with do |path, content|
|
224
224
|
path.should == file
|
225
225
|
content.should match(/"fonts":/)
|
@@ -11,14 +11,14 @@ describe Fontcustom::Generator::Template do
|
|
11
11
|
Fontcustom::Generator::Template.new([opts])
|
12
12
|
end
|
13
13
|
|
14
|
-
context "#
|
14
|
+
context "#get_manifest" do
|
15
15
|
it "should raise error if data file doesn't exist" do
|
16
16
|
gen = generator(
|
17
17
|
:project_root => fixture,
|
18
18
|
:input => "shared/vectors",
|
19
19
|
:quiet => true
|
20
20
|
)
|
21
|
-
expect { gen.
|
21
|
+
expect { gen.get_manifest }.to raise_error Fontcustom::Error, /\.fontcustom-manifest\.json/
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should assign @data from data file" do
|
@@ -27,7 +27,7 @@ describe Fontcustom::Generator::Template do
|
|
27
27
|
:input => "../shared/vectors",
|
28
28
|
:quiet => true
|
29
29
|
)
|
30
|
-
gen.
|
30
|
+
gen.get_manifest
|
31
31
|
gen.instance_variable_get(:@data)[:templates].should =~ data_file_contents[:templates]
|
32
32
|
end
|
33
33
|
end
|
@@ -64,7 +64,7 @@ describe Fontcustom::Generator::Template do
|
|
64
64
|
end
|
65
65
|
|
66
66
|
it "should update the data file" do
|
67
|
-
file = fixture("generators/.fontcustom-
|
67
|
+
file = fixture("generators/.fontcustom-manifest.json")
|
68
68
|
subject.should_receive(:overwrite_file).once.with(file, /"templates":/)
|
69
69
|
subject.reset_output
|
70
70
|
end
|
@@ -136,7 +136,7 @@ describe Fontcustom::Generator::Template do
|
|
136
136
|
end
|
137
137
|
|
138
138
|
it "should update data file with generated templates" do
|
139
|
-
file = fixture("generators/.fontcustom-
|
139
|
+
file = fixture("generators/.fontcustom-manifest.json")
|
140
140
|
subject.should_receive(:overwrite_file).once.with do |path, content|
|
141
141
|
path.should == file
|
142
142
|
content.should match(/fontcustom\.css/)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
require 'spec_helper'
|
2
3
|
|
3
4
|
describe Fontcustom::Options do
|
@@ -125,7 +126,8 @@ describe Fontcustom::Options do
|
|
125
126
|
o = options
|
126
127
|
o.instance_variable_set :@config_options, {}
|
127
128
|
o.send :merge_options
|
128
|
-
o.
|
129
|
+
o.send :remove_instance_variable, :@mock_proxy if o.instance_variable_get(:@mock_proxy)
|
130
|
+
o.instance_variables.length.should == Fontcustom::DEFAULT_OPTIONS.length + 1 # @shell
|
129
131
|
end
|
130
132
|
|
131
133
|
it "should overwrite defaults with config file" do
|
@@ -154,24 +156,24 @@ describe Fontcustom::Options do
|
|
154
156
|
end
|
155
157
|
|
156
158
|
context ".set_data_path" do
|
157
|
-
it "should set :
|
159
|
+
it "should set :manifest in the config dir by default" do
|
158
160
|
silent
|
159
161
|
o = options
|
160
162
|
o.instance_variable_set :@config, "path/to/config/fontcustom.yml"
|
161
|
-
o.instance_variable_set :@
|
162
|
-
o.remove_instance_variable :@cli_options
|
163
|
+
o.instance_variable_set :@manifest, nil
|
164
|
+
o.send :remove_instance_variable, :@cli_options
|
163
165
|
o.send :set_data_path
|
164
|
-
o.instance_variable_get(:@
|
166
|
+
o.instance_variable_get(:@manifest).should == "path/to/config/.fontcustom-manifest.json"
|
165
167
|
end
|
166
168
|
end
|
167
169
|
|
168
170
|
context "#send :set_input_paths" do
|
169
|
-
it "should raise error if input[:vectors] doesn't contain
|
171
|
+
it "should raise error if input[:vectors] doesn't contain SVGs" do
|
170
172
|
o = options
|
171
173
|
o.instance_variable_set :@project_root, fixture
|
172
174
|
o.instance_variable_set :@input, "shared/vectors-empty"
|
173
|
-
o.remove_instance_variable :@cli_options
|
174
|
-
expect { o.send :set_input_paths }.to raise_error Fontcustom::Error, /doesn't contain any
|
175
|
+
o.send :remove_instance_variable, :@cli_options
|
176
|
+
expect { o.send :set_input_paths }.to raise_error Fontcustom::Error, /doesn't contain any SVGs/
|
175
177
|
end
|
176
178
|
|
177
179
|
context "when @input is a hash" do
|
@@ -180,7 +182,7 @@ describe Fontcustom::Options do
|
|
180
182
|
o = options
|
181
183
|
o.instance_variable_set :@project_root, fixture
|
182
184
|
o.instance_variable_set :@input, hash
|
183
|
-
o.remove_instance_variable :@cli_options
|
185
|
+
o.send :remove_instance_variable, :@cli_options
|
184
186
|
o.send :set_input_paths
|
185
187
|
input = o.instance_variable_get :@input
|
186
188
|
input[:templates].should == fixture("shared/vectors")
|
@@ -191,7 +193,7 @@ describe Fontcustom::Options do
|
|
191
193
|
o = options
|
192
194
|
o.instance_variable_set :@project_root, fixture
|
193
195
|
o.instance_variable_set :@input, hash
|
194
|
-
o.remove_instance_variable :@cli_options
|
196
|
+
o.send :remove_instance_variable, :@cli_options
|
195
197
|
o.send :set_input_paths
|
196
198
|
input = o.instance_variable_get :@input
|
197
199
|
input[:templates].should == fixture("shared/templates")
|
@@ -202,7 +204,7 @@ describe Fontcustom::Options do
|
|
202
204
|
o = options
|
203
205
|
o.instance_variable_set :@project_root, fixture
|
204
206
|
o.instance_variable_set :@input, hash
|
205
|
-
o.remove_instance_variable :@cli_options
|
207
|
+
o.send :remove_instance_variable, :@cli_options
|
206
208
|
expect { o.send :set_input_paths }.to raise_error Fontcustom::Error, /contain a :vectors key/
|
207
209
|
end
|
208
210
|
|
@@ -211,7 +213,7 @@ describe Fontcustom::Options do
|
|
211
213
|
o = options
|
212
214
|
o.instance_variable_set :@project_root, fixture
|
213
215
|
o.instance_variable_set :@input, hash
|
214
|
-
o.remove_instance_variable :@cli_options
|
216
|
+
o.send :remove_instance_variable, :@cli_options
|
215
217
|
expect { o.send :set_input_paths }.to raise_error Fontcustom::Error, /should be a directory/
|
216
218
|
end
|
217
219
|
end
|
@@ -221,7 +223,7 @@ describe Fontcustom::Options do
|
|
221
223
|
o = options
|
222
224
|
o.instance_variable_set :@project_root, fixture
|
223
225
|
o.instance_variable_set :@input, "shared/vectors"
|
224
|
-
o.remove_instance_variable :@cli_options
|
226
|
+
o.send :remove_instance_variable, :@cli_options
|
225
227
|
o.send :set_input_paths
|
226
228
|
input = o.instance_variable_get :@input
|
227
229
|
input.should have_key(:vectors)
|
@@ -232,7 +234,7 @@ describe Fontcustom::Options do
|
|
232
234
|
o = options
|
233
235
|
o.instance_variable_set :@project_root, fixture
|
234
236
|
o.instance_variable_set :@input, "shared/vectors"
|
235
|
-
o.remove_instance_variable :@cli_options
|
237
|
+
o.send :remove_instance_variable, :@cli_options
|
236
238
|
o.send :set_input_paths
|
237
239
|
input = o.instance_variable_get :@input
|
238
240
|
input[:templates].should == fixture("shared/vectors")
|
@@ -242,7 +244,7 @@ describe Fontcustom::Options do
|
|
242
244
|
o = options
|
243
245
|
o.instance_variable_set :@project_root, fixture
|
244
246
|
o.instance_variable_set :@input, "shared/not-a-dir"
|
245
|
-
o.remove_instance_variable :@cli_options
|
247
|
+
o.send :remove_instance_variable, :@cli_options
|
246
248
|
expect { o.send :set_input_paths }.to raise_error Fontcustom::Error, /should be a directory/
|
247
249
|
end
|
248
250
|
end
|
@@ -256,7 +258,7 @@ describe Fontcustom::Options do
|
|
256
258
|
o.instance_variable_set :@project_root, fixture
|
257
259
|
o.instance_variable_set :@font_name, "Test-Font"
|
258
260
|
o.instance_variable_set :@output, nil
|
259
|
-
o.remove_instance_variable :@cli_options
|
261
|
+
o.send :remove_instance_variable, :@cli_options
|
260
262
|
o.send :set_output_paths
|
261
263
|
output = o.instance_variable_get :@output
|
262
264
|
output[:fonts].should == fixture("Test-Font")
|
@@ -267,7 +269,7 @@ describe Fontcustom::Options do
|
|
267
269
|
o.instance_variable_set :@project_root, fixture
|
268
270
|
o.instance_variable_set :@font_name, "Test-Font"
|
269
271
|
o.instance_variable_set :@output, nil
|
270
|
-
o.remove_instance_variable :@cli_options
|
272
|
+
o.send :remove_instance_variable, :@cli_options
|
271
273
|
stdout = capture(:stdout) { o.send :set_output_paths }
|
272
274
|
stdout.should match("Test-Font")
|
273
275
|
end
|
@@ -279,7 +281,7 @@ describe Fontcustom::Options do
|
|
279
281
|
o = options
|
280
282
|
o.instance_variable_set :@project_root, fixture
|
281
283
|
o.instance_variable_set :@output, hash
|
282
|
-
o.remove_instance_variable :@cli_options
|
284
|
+
o.send :remove_instance_variable, :@cli_options
|
283
285
|
o.send :set_output_paths
|
284
286
|
output = o.instance_variable_get :@output
|
285
287
|
output[:css].should == fixture("output/fonts")
|
@@ -295,7 +297,7 @@ describe Fontcustom::Options do
|
|
295
297
|
o = options
|
296
298
|
o.instance_variable_set :@project_root, fixture
|
297
299
|
o.instance_variable_set :@output, hash
|
298
|
-
o.remove_instance_variable :@cli_options
|
300
|
+
o.send :remove_instance_variable, :@cli_options
|
299
301
|
o.send :set_output_paths
|
300
302
|
output = o.instance_variable_get :@output
|
301
303
|
output[:css].should == fixture("output/styles")
|
@@ -310,7 +312,7 @@ describe Fontcustom::Options do
|
|
310
312
|
o = options
|
311
313
|
o.instance_variable_set :@project_root, fixture
|
312
314
|
o.instance_variable_set :@output, hash
|
313
|
-
o.remove_instance_variable :@cli_options
|
315
|
+
o.send :remove_instance_variable, :@cli_options
|
314
316
|
o.send :set_output_paths
|
315
317
|
output = o.instance_variable_get :@output
|
316
318
|
output[:"special.js"].should == fixture("assets/javascripts")
|
@@ -321,7 +323,7 @@ describe Fontcustom::Options do
|
|
321
323
|
o = options
|
322
324
|
o.instance_variable_set :@project_root, fixture
|
323
325
|
o.instance_variable_set :@output, hash
|
324
|
-
o.remove_instance_variable :@cli_options
|
326
|
+
o.send :remove_instance_variable, :@cli_options
|
325
327
|
expect { o.send :set_output_paths }.to raise_error Fontcustom::Error, /contain a :fonts key/
|
326
328
|
end
|
327
329
|
end
|
@@ -331,7 +333,7 @@ describe Fontcustom::Options do
|
|
331
333
|
o = options
|
332
334
|
o.instance_variable_set :@project_root, fixture
|
333
335
|
o.instance_variable_set :@output, "output/fonts"
|
334
|
-
o.remove_instance_variable :@cli_options
|
336
|
+
o.send :remove_instance_variable, :@cli_options
|
335
337
|
o.send :set_output_paths
|
336
338
|
output = o.instance_variable_get :@output
|
337
339
|
output.should be_a(Hash)
|
@@ -344,7 +346,7 @@ describe Fontcustom::Options do
|
|
344
346
|
o = options
|
345
347
|
o.instance_variable_set :@project_root, fixture
|
346
348
|
o.instance_variable_set :@output, "output/fonts"
|
347
|
-
o.remove_instance_variable :@cli_options
|
349
|
+
o.send :remove_instance_variable, :@cli_options
|
348
350
|
o.send :set_output_paths
|
349
351
|
output = o.instance_variable_get :@output
|
350
352
|
output[:css].should == fixture("output/fonts")
|
@@ -355,7 +357,7 @@ describe Fontcustom::Options do
|
|
355
357
|
o = options
|
356
358
|
o.instance_variable_set :@project_root, fixture
|
357
359
|
o.instance_variable_set :@output, "shared/not-a-dir"
|
358
|
-
o.remove_instance_variable :@cli_options
|
360
|
+
o.send :remove_instance_variable, :@cli_options
|
359
361
|
expect { o.send :set_output_paths }.to raise_error Fontcustom::Error, /directory, not a file/
|
360
362
|
end
|
361
363
|
end
|
@@ -367,7 +369,7 @@ describe Fontcustom::Options do
|
|
367
369
|
o.instance_variable_set :@project_root, fixture
|
368
370
|
o.instance_variable_set :@input, { :templates => "shared/templates" }
|
369
371
|
o.instance_variable_set :@templates, %w|preview css scss bootstrap bootstrap-scss bootstrap-ie7 bootstrap-ie7-scss|
|
370
|
-
o.remove_instance_variable :@cli_options
|
372
|
+
o.send :remove_instance_variable, :@cli_options
|
371
373
|
o.send :set_template_paths
|
372
374
|
templates = o.instance_variable_get :@templates
|
373
375
|
templates.should =~ [
|
@@ -386,7 +388,7 @@ describe Fontcustom::Options do
|
|
386
388
|
o.instance_variable_set :@project_root, fixture
|
387
389
|
o.instance_variable_set :@input, { :templates => fixture("shared/templates") }
|
388
390
|
o.instance_variable_set :@templates, %w|custom.css|
|
389
|
-
o.remove_instance_variable :@cli_options
|
391
|
+
o.send :remove_instance_variable, :@cli_options
|
390
392
|
o.send :set_template_paths
|
391
393
|
templates = o.instance_variable_get :@templates
|
392
394
|
templates.should =~ [fixture("shared/templates/custom.css")]
|
@@ -397,7 +399,7 @@ describe Fontcustom::Options do
|
|
397
399
|
o.instance_variable_set :@project_root, fixture
|
398
400
|
o.instance_variable_set :@input, { :templates => "shared/templates" }
|
399
401
|
o.instance_variable_set :@templates, %w|fake-template.txt|
|
400
|
-
o.remove_instance_variable :@cli_options
|
402
|
+
o.send :remove_instance_variable, :@cli_options
|
401
403
|
expect { o.send :set_template_paths }.to raise_error Fontcustom::Error, /does not exist/
|
402
404
|
end
|
403
405
|
end
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fontcustom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Kai Zau
|
@@ -9,94 +10,106 @@ authors:
|
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2013-
|
13
|
+
date: 2013-11-03 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: json
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
17
19
|
requirements:
|
18
20
|
- - ~>
|
19
21
|
- !ruby/object:Gem::Version
|
20
|
-
version: '1.
|
22
|
+
version: '1.4'
|
21
23
|
type: :runtime
|
22
24
|
prerelease: false
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
24
27
|
requirements:
|
25
28
|
- - ~>
|
26
29
|
- !ruby/object:Gem::Version
|
27
|
-
version: '1.
|
30
|
+
version: '1.4'
|
28
31
|
- !ruby/object:Gem::Dependency
|
29
32
|
name: thor
|
30
33
|
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
31
35
|
requirements:
|
32
36
|
- - ~>
|
33
37
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
38
|
+
version: '0.14'
|
35
39
|
type: :runtime
|
36
40
|
prerelease: false
|
37
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
38
43
|
requirements:
|
39
44
|
- - ~>
|
40
45
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.
|
46
|
+
version: '0.14'
|
42
47
|
- !ruby/object:Gem::Dependency
|
43
48
|
name: listen
|
44
49
|
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
45
51
|
requirements:
|
46
52
|
- - ~>
|
47
53
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.
|
54
|
+
version: '1.0'
|
49
55
|
type: :runtime
|
50
56
|
prerelease: false
|
51
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
52
59
|
requirements:
|
53
60
|
- - ~>
|
54
61
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.
|
62
|
+
version: '1.0'
|
56
63
|
- !ruby/object:Gem::Dependency
|
57
64
|
name: rake
|
58
65
|
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
59
67
|
requirements:
|
60
|
-
- - '>='
|
68
|
+
- - ! '>='
|
61
69
|
- !ruby/object:Gem::Version
|
62
70
|
version: '0'
|
63
71
|
type: :development
|
64
72
|
prerelease: false
|
65
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
66
75
|
requirements:
|
67
|
-
- - '>='
|
76
|
+
- - ! '>='
|
68
77
|
- !ruby/object:Gem::Version
|
69
78
|
version: '0'
|
70
79
|
- !ruby/object:Gem::Dependency
|
71
80
|
name: bundler
|
72
81
|
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
73
83
|
requirements:
|
74
|
-
- - '>='
|
84
|
+
- - ! '>='
|
75
85
|
- !ruby/object:Gem::Version
|
76
86
|
version: '0'
|
77
87
|
type: :development
|
78
88
|
prerelease: false
|
79
89
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
80
91
|
requirements:
|
81
|
-
- - '>='
|
92
|
+
- - ! '>='
|
82
93
|
- !ruby/object:Gem::Version
|
83
94
|
version: '0'
|
84
95
|
- !ruby/object:Gem::Dependency
|
85
96
|
name: rspec
|
86
97
|
requirement: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
87
99
|
requirements:
|
88
|
-
- - '>='
|
100
|
+
- - ! '>='
|
89
101
|
- !ruby/object:Gem::Version
|
90
102
|
version: '0'
|
91
103
|
type: :development
|
92
104
|
prerelease: false
|
93
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
94
107
|
requirements:
|
95
|
-
- - '>='
|
108
|
+
- - ! '>='
|
96
109
|
- !ruby/object:Gem::Version
|
97
110
|
version: '0'
|
98
|
-
description:
|
99
|
-
|
111
|
+
description: Font Custom makes using vector icons easy. Generate icon fonts and supporting
|
112
|
+
templates (e.g. @font-face CSS) from a collection of SVGs.
|
100
113
|
email:
|
101
114
|
- kai@kaizau.com
|
102
115
|
- joshua@gross.is
|
@@ -106,6 +119,7 @@ extensions: []
|
|
106
119
|
extra_rdoc_files: []
|
107
120
|
files:
|
108
121
|
- .gitignore
|
122
|
+
- .travis.yml
|
109
123
|
- CHANGELOG.md
|
110
124
|
- CONTRIBUTING.md
|
111
125
|
- Gemfile
|
@@ -135,8 +149,8 @@ files:
|
|
135
149
|
- lib/fontcustom/util.rb
|
136
150
|
- lib/fontcustom/version.rb
|
137
151
|
- lib/fontcustom/watcher.rb
|
138
|
-
- spec/fixtures/generators/.fontcustom-
|
139
|
-
- spec/fixtures/generators/.fontcustom-
|
152
|
+
- spec/fixtures/generators/.fontcustom-manifest-corrupted.json
|
153
|
+
- spec/fixtures/generators/.fontcustom-manifest.json
|
140
154
|
- spec/fixtures/generators/fontcustom.yml
|
141
155
|
- spec/fixtures/generators/mixed-output/another-font.ttf
|
142
156
|
- spec/fixtures/generators/mixed-output/dont-delete-me.bro
|
@@ -167,31 +181,39 @@ files:
|
|
167
181
|
- spec/spec_helper.rb
|
168
182
|
homepage: http://fontcustom.com
|
169
183
|
licenses: []
|
170
|
-
|
171
|
-
|
172
|
-
|
184
|
+
post_install_message: ! '>> Thanks for installing Font Custom! Please ensure that
|
185
|
+
fontforge is installed before compiling any icons. Visit <http://fontcustom.com>
|
186
|
+
for instructions.'
|
173
187
|
rdoc_options: []
|
174
188
|
require_paths:
|
175
189
|
- lib
|
176
190
|
required_ruby_version: !ruby/object:Gem::Requirement
|
191
|
+
none: false
|
177
192
|
requirements:
|
178
|
-
- - '>='
|
193
|
+
- - ! '>='
|
179
194
|
- !ruby/object:Gem::Version
|
180
195
|
version: '0'
|
196
|
+
segments:
|
197
|
+
- 0
|
198
|
+
hash: 1146963489862796142
|
181
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
|
+
none: false
|
182
201
|
requirements:
|
183
|
-
- - '>='
|
202
|
+
- - ! '>='
|
184
203
|
- !ruby/object:Gem::Version
|
185
204
|
version: '0'
|
205
|
+
segments:
|
206
|
+
- 0
|
207
|
+
hash: 1146963489862796142
|
186
208
|
requirements: []
|
187
209
|
rubyforge_project:
|
188
|
-
rubygems_version:
|
210
|
+
rubygems_version: 1.8.23
|
189
211
|
signing_key:
|
190
|
-
specification_version:
|
191
|
-
summary: Generate icon
|
212
|
+
specification_version: 3
|
213
|
+
summary: Generate icon fonts from the command line.
|
192
214
|
test_files:
|
193
|
-
- spec/fixtures/generators/.fontcustom-
|
194
|
-
- spec/fixtures/generators/.fontcustom-
|
215
|
+
- spec/fixtures/generators/.fontcustom-manifest-corrupted.json
|
216
|
+
- spec/fixtures/generators/.fontcustom-manifest.json
|
195
217
|
- spec/fixtures/generators/fontcustom.yml
|
196
218
|
- spec/fixtures/generators/mixed-output/another-font.ttf
|
197
219
|
- spec/fixtures/generators/mixed-output/dont-delete-me.bro
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 4fc3add333473a23ddcb18a08c6b01eed71a029e
|
4
|
-
data.tar.gz: 2e0d757e1a0b038dc6bc8abdb22d900b24cbb268
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 395f8eda59b936c25d52d832984dc514e594df0ba1a4742e652aa3115cfd388fbd8700e18eb72d6bc485af2b8dd784afedbe26e545117ebd3aea7b7970a5b377
|
7
|
-
data.tar.gz: d7fc088e213741da7d607273ebe9896fb836c6e7d66028bdbb4aeb950d3f45d4fcb3ea0168c7b98fa2fbef662d14841d133407a1adb9e01ccaebfd0124ab0933
|