fontcustom 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: dc2597df3b94e7657fbaa82856e909f1b762baa7
4
- data.tar.gz: 8f6437cb607c18c0c47228abc212058af9d58769
2
+ SHA256:
3
+ metadata.gz: c9c63851bbd063f14094fb75fc2923cd649443d3111e6da671533a93846f921a
4
+ data.tar.gz: 0cb1109485f1ed214cbbcce83368746dff0f28d8ed217f6c445a302894a6b806
5
5
  SHA512:
6
- metadata.gz: 3faa26c666038c1e5b9ad4436ec849005fb5c32d2c8d255dc39065b08d4ea60a0e8faf10c1b4d606f63f7593b7a4019312e6f6823b830478ae7b124cb3fe4a08
7
- data.tar.gz: afef84481d791bba0492fe284dffdb9331aeebae95ad03385ecc9e5a07fe53ea9c687e9b7a3baf8ec5b8ba74e9d98f43dd2f88d3e79514ed7e1b81e44028b95e
6
+ metadata.gz: 176657d61300735fc782aae9771126d9525ad2dee623b531a033ff2fa0e2107e04fbf334e13184b072b959d9a9b11cb5c2b0de95fed561ab134c31c8d7c8eed9
7
+ data.tar.gz: 273ca5993efe80d6df862ca0b467aa0f811926566c3e38d334cf6c4f9c920f52776d485c5efde5f17b03d9b14aa20f237685a26462c99fc863b939c42c97d030
data/.travis.yml CHANGED
@@ -9,9 +9,7 @@ addons:
9
9
  - gcc-4.8
10
10
  - g++-4.8
11
11
  before_install:
12
- - wget http://people.mozilla.com/~jkew/woff/woff-code-latest.zip
13
- - unzip woff-code-latest.zip -d sfnt2woff && cd sfnt2woff && make && mkdir -p bin && mv sfnt2woff bin && cd ..
14
- - export PATH=$PATH:$PWD/sfnt2woff/bin/
12
+ - git clone https://github.com/bramstein/sfnt2woff-zopfli.git sfnt2woff-zopfli && cd sfnt2woff-zopfli && make && sudo mv sfnt2woff-zopfli /usr/local/bin/sfnt2woff
15
13
  - if [ $TRAVIS_OS_NAME == "linux" ]; then
16
14
  export CC="gcc-4.8";
17
15
  export CXX="g++-4.8";
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 3.0.0 (1/9/2026)
2
+
3
+ * Minimum Ruby version bumped to 2.6
4
+ * Updated dependencies: thor ~> 1.0, listen ~> 3.0, rake ~> 13.0, rspec ~> 3.0
5
+ * Removed json dependency (now part of Ruby stdlib)
6
+ * Fixed Python script to use `sys.executable` for correct interpreter path
7
+
1
8
  ## 2.0.0 (6/14/2017)
2
9
 
3
10
  * Adds support for Woff2 ([#313](https://github.com/FontCustom/fontcustom/pull/313))
data/README.md CHANGED
@@ -16,22 +16,17 @@ from a collection of SVGs
16
16
 
17
17
  ### Installation
18
18
 
19
- Requires **Ruby 1.9.3+**, **WOFF2**, **FontForge** with Python scripting.
19
+ Requires **Ruby 2.6+**, **WOFF2**, **FontForge** with Python scripting.
20
20
 
21
21
  ```sh
22
22
  # On Mac
23
23
  brew tap bramstein/webfonttools
24
- brew update
25
- brew install woff2
26
-
27
- brew install fontforge --with-python
28
- brew install eot-utils
24
+ brew install woff2 sfnt2woff fontforge eot-utils
29
25
  gem install fontcustom
30
26
 
31
27
  # On Linux
32
28
  sudo apt-get install zlib1g-dev fontforge
33
- wget http://people.mozilla.com/~jkew/woff/woff-code-latest.zip
34
- unzip woff-code-latest.zip -d sfnt2woff && cd sfnt2woff && make && sudo mv sfnt2woff /usr/local/bin/
29
+ git clone https://github.com/bramstein/sfnt2woff-zopfli.git sfnt2woff-zopfli && cd sfnt2woff-zopfli && make && mv sfnt2woff-zopfli /usr/local/bin/sfnt2woff
35
30
  git clone --recursive https://github.com/google/woff2.git && cd woff2 && make clean all && sudo mv woff2_compress /usr/local/bin/ && sudo mv woff2_decompress /usr/local/bin/
36
31
  gem install fontcustom
37
32
  ```
data/fontcustom.gemspec CHANGED
@@ -17,12 +17,13 @@ Gem::Specification.new do |gem|
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
+ gem.required_ruby_version = ">= 2.6"
20
21
 
21
- gem.add_dependency "json", "~>1.4"
22
- gem.add_dependency "thor", "~>0.14"
23
- gem.add_dependency "listen", ">=1.0","<4.0"
22
+ gem.add_dependency "thor", "~> 1.0"
23
+ gem.add_dependency "listen", "~> 3.0"
24
+ gem.add_dependency "ffi", "~> 1.15.0"
24
25
 
25
- gem.add_development_dependency "rake", "~> 10"
26
+ gem.add_development_dependency "rake", "~> 13.0"
26
27
  gem.add_development_dependency "bundler"
27
- gem.add_development_dependency "rspec", "~>3.1.0"
28
+ gem.add_development_dependency "rspec", "~> 3.0"
28
29
  end
@@ -1,6 +1,7 @@
1
1
  import fontforge
2
2
  import os
3
3
  import subprocess
4
+ import sys
4
5
  import tempfile
5
6
  import json
6
7
 
@@ -115,9 +116,9 @@ try:
115
116
  try:
116
117
  # check if on windows
117
118
  if os.name == 'nt':
118
- subprocess.Popen([scriptPath + '/sfnt2woff.exe', fontfile + '.ttf'], stdout=subprocess.PIPE)
119
+ subprocess.Popen([scriptPath + '/sfnt2woff.exe', fontfile + '.ttf'], stdout=subprocess.PIPE).wait()
119
120
  else:
120
- subprocess.Popen([scriptPath + '/sfnt2woff', fontfile + '.ttf'], stdout=subprocess.PIPE)
121
+ subprocess.Popen([scriptPath + '/sfnt2woff', fontfile + '.ttf'], stdout=subprocess.PIPE).wait()
121
122
  except OSError:
122
123
  # If the local version of sfnt2woff fails (i.e., on Linux), try to use the
123
124
  # global version. This allows us to avoid forcing OS X users to compile
@@ -126,7 +127,8 @@ try:
126
127
  manifest['fonts'].append(fontfile + '.woff')
127
128
 
128
129
  # Convert EOT for IE7
129
- subprocess.call('python ' + scriptPath + '/eotlitetool.py ' + fontfile + '.ttf -o ' + fontfile + '.eot', shell=True)
130
+ python_cmd = sys.executable
131
+ subprocess.call(python_cmd + ' ' + scriptPath + '/eotlitetool.py ' + fontfile + '.ttf -o ' + fontfile + '.eot', shell=True)
130
132
  # check if windows
131
133
  if os.name == 'nt':
132
134
  subprocess.call('move ' + fontfile + '.eotlite ' + fontfile + '.eot', shell=True)
@@ -1,3 +1,3 @@
1
1
  module Fontcustom
2
- VERSION = "2.0.0"
2
+ VERSION = "3.0.0"
3
3
  end
data/lib/fontcustom.rb CHANGED
@@ -19,7 +19,7 @@ module Fontcustom
19
19
  EXAMPLE_OPTIONS = {
20
20
  :output => "./FONT_NAME",
21
21
  :config => "./fontcustom.yml -or- ./config/fontcustom.yml",
22
- :templates => "css preview"
22
+ :templates => %w|css preview|
23
23
  }
24
24
 
25
25
  DEFAULT_OPTIONS = {
@@ -26,15 +26,19 @@ describe Fontcustom::Options do
26
26
  context ".set_config_path" do
27
27
  context "when :config is set" do
28
28
  it "should use options[:config] if it's a file" do
29
- o = options :config => "options/any-file-name.yml"
30
- o.send :set_config_path
31
- expect(o.instance_variable_get(:@cli_options)[:config]).to eq("options/any-file-name.yml")
29
+ FileUtils.cd fixture do
30
+ o = options :config => "options/any-file-name.yml"
31
+ o.send :set_config_path
32
+ expect(o.instance_variable_get(:@cli_options)[:config]).to eq("options/any-file-name.yml")
33
+ end
32
34
  end
33
35
 
34
36
  it "should search for fontcustom.yml if options[:config] is a dir" do
35
- o = options :config => "options/config-is-in-dir"
36
- o.send :set_config_path
37
- expect(o.instance_variable_get(:@cli_options)[:config]).to eq("options/config-is-in-dir/fontcustom.yml")
37
+ FileUtils.cd fixture do
38
+ o = options :config => "options/config-is-in-dir"
39
+ o.send :set_config_path
40
+ expect(o.instance_variable_get(:@cli_options)[:config]).to eq("options/config-is-in-dir/fontcustom.yml")
41
+ end
38
42
  end
39
43
 
40
44
  it "should raise error if :config doesn't exist" do
@@ -21,8 +21,8 @@ describe Fontcustom::Watcher do
21
21
  expect_any_instance_of(Fontcustom::Base).to receive(:compile).once
22
22
 
23
23
  w = watcher(
24
- :input => "shared/vectors",
25
- :output => "output"
24
+ :input => fixture("shared/vectors"),
25
+ :output => fixture("output")
26
26
  )
27
27
 
28
28
  # silence output
@@ -36,8 +36,8 @@ describe Fontcustom::Watcher do
36
36
  expect_any_instance_of(Fontcustom::Base).to_not receive(:compile).once
37
37
 
38
38
  w = watcher(
39
- :input => "shared/vectors",
40
- :output => "output",
39
+ :input => fixture("shared/vectors"),
40
+ :output => fixture("output"),
41
41
  :skip_first => true
42
42
  )
43
43
 
@@ -51,8 +51,8 @@ describe Fontcustom::Watcher do
51
51
  expect_any_instance_of(Fontcustom::Base).to receive(:compile).once
52
52
 
53
53
  w = watcher(
54
- :input => "shared/vectors",
55
- :output => "output",
54
+ :input => fixture("shared/vectors"),
55
+ :output => fixture("output"),
56
56
  :skip_first => true
57
57
  )
58
58
 
@@ -73,9 +73,9 @@ describe Fontcustom::Watcher do
73
73
  expect_any_instance_of(Fontcustom::Base).to receive(:compile)
74
74
 
75
75
  w = watcher(
76
- :input => {:vectors => "shared/vectors", :templates => "shared/templates"},
76
+ :input => {:vectors => fixture("shared/vectors"), :templates => fixture("shared/templates")},
77
77
  :templates => %w|css preview custom.css|,
78
- :output => "output",
78
+ :output => fixture("output"),
79
79
  :skip_first => false
80
80
  )
81
81
 
@@ -101,8 +101,8 @@ describe Fontcustom::Watcher do
101
101
  expect_any_instance_of(Fontcustom::Base).to_not receive(:compile).once
102
102
 
103
103
  w = watcher(
104
- :input => "shared/vectors",
105
- :output => "output",
104
+ :input => fixture("shared/vectors"),
105
+ :output => fixture("output"),
106
106
  :skip_first => true
107
107
  )
108
108
 
data/spec/spec_helper.rb CHANGED
@@ -4,11 +4,6 @@ require "fileutils"
4
4
  require File.expand_path("../../lib/fontcustom.rb", __FILE__)
5
5
 
6
6
  RSpec.configure do |c|
7
- c.before(:all) do
8
- FileUtils.cd fixture
9
- puts "Running `cd #{Dir.pwd}`"
10
- end
11
-
12
7
  def fixture(path = "")
13
8
  File.join(File.expand_path("../fixtures", __FILE__), path)
14
9
  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: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kai Zau
@@ -9,70 +9,64 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-06-14 00:00:00.000000000 Z
12
+ date: 2026-01-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: json
15
+ name: thor
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.4'
20
+ version: '1.0'
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
- version: '1.4'
27
+ version: '1.0'
28
28
  - !ruby/object:Gem::Dependency
29
- name: thor
29
+ name: listen
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '0.14'
34
+ version: '3.0'
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
- version: '0.14'
41
+ version: '3.0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: listen
43
+ name: ffi
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: '1.0'
49
- - - "<"
46
+ - - "~>"
50
47
  - !ruby/object:Gem::Version
51
- version: '4.0'
48
+ version: 1.15.0
52
49
  type: :runtime
53
50
  prerelease: false
54
51
  version_requirements: !ruby/object:Gem::Requirement
55
52
  requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- version: '1.0'
59
- - - "<"
53
+ - - "~>"
60
54
  - !ruby/object:Gem::Version
61
- version: '4.0'
55
+ version: 1.15.0
62
56
  - !ruby/object:Gem::Dependency
63
57
  name: rake
64
58
  requirement: !ruby/object:Gem::Requirement
65
59
  requirements:
66
60
  - - "~>"
67
61
  - !ruby/object:Gem::Version
68
- version: '10'
62
+ version: '13.0'
69
63
  type: :development
70
64
  prerelease: false
71
65
  version_requirements: !ruby/object:Gem::Requirement
72
66
  requirements:
73
67
  - - "~>"
74
68
  - !ruby/object:Gem::Version
75
- version: '10'
69
+ version: '13.0'
76
70
  - !ruby/object:Gem::Dependency
77
71
  name: bundler
78
72
  requirement: !ruby/object:Gem::Requirement
@@ -93,14 +87,14 @@ dependencies:
93
87
  requirements:
94
88
  - - "~>"
95
89
  - !ruby/object:Gem::Version
96
- version: 3.1.0
90
+ version: '3.0'
97
91
  type: :development
98
92
  prerelease: false
99
93
  version_requirements: !ruby/object:Gem::Requirement
100
94
  requirements:
101
95
  - - "~>"
102
96
  - !ruby/object:Gem::Version
103
- version: 3.1.0
97
+ version: '3.0'
104
98
  description: Font Custom makes using vector icons easy. Generate icon fonts and supporting
105
99
  templates (e.g. @font-face CSS) from a collection of SVGs.
106
100
  email:
@@ -197,15 +191,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
197
191
  requirements:
198
192
  - - ">="
199
193
  - !ruby/object:Gem::Version
200
- version: '0'
194
+ version: '2.6'
201
195
  required_rubygems_version: !ruby/object:Gem::Requirement
202
196
  requirements:
203
197
  - - ">="
204
198
  - !ruby/object:Gem::Version
205
199
  version: '0'
206
200
  requirements: []
207
- rubyforge_project:
208
- rubygems_version: 2.6.11
201
+ rubygems_version: 3.0.3.1
209
202
  signing_key:
210
203
  specification_version: 4
211
204
  summary: Generate icon fonts from the command line.