dragonfly_fonts 0.0.6 → 0.0.7

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: 371ba77b9cfa0d18d9f78bca658440a89f52c59d
4
- data.tar.gz: efd6c626d93e85a3f056574535e2b03470d4ca85
3
+ metadata.gz: 47b03f7d6665ca17df9e046dbe39f1bd9cfee206
4
+ data.tar.gz: 750a4d3c92fc8112f40e59e323998a9b5825d31e
5
5
  SHA512:
6
- metadata.gz: 16cf9f67d7157c56983946e4fcaf7635ecb2d34f7a8e09df50597eb51624bd0b98b8af50b2a6f6c9040f22018bb8a894882901f206187d40bd1f67b7820a18be
7
- data.tar.gz: 48aaa7934af9b44a9b2c1c5edfecec55e10e25cc66b0a3c5ebd000ed2e87fe1ecd4b4e8aa72c01db75b87692c235dedf536ec535307b04801cfd4fc30b7fd3f1
6
+ metadata.gz: '039a6424ae119d1d57a82697b4a3a9e9dc475daae788b82c8b2a0db45ae4169bff528f1af9bb1986ddafc75959f15bd5f63bc4a0ac2fb3c16416dd68afe3671c'
7
+ data.tar.gz: 12c489663c7bb58bb6d8fdce28c04c33a872e818f8415b31af220a1952ab58eb106be10368c9656c7cbf608793f2e535573e8fb43e172d1659efa580f0e190f9
@@ -4,7 +4,7 @@ module DragonflyFonts
4
4
  module Analysers
5
5
  class OtSanitise
6
6
  def call(font)
7
- `#{ot_sanitise_command} '#{font.path}' 2>&1`
7
+ `#{ot_sanitise_command} #{font.path} 2>&1`
8
8
  end
9
9
 
10
10
  private
@@ -2,7 +2,7 @@ module DragonflyFonts
2
2
  module Processors
3
3
  class CorrectMetrics
4
4
  def call(font)
5
- font.shell_update do |old_path, new_path|
5
+ font.shell_update(ext: font.ext || :ttf) do |old_path, new_path|
6
6
  "#{fontforge_command} -lang=ff -c 'Open($1); SetOS2Value(\"HHeadAscent\",$ascent); SetOS2Value(\"HHeadAscentIsOffset\",0); SetOS2Value(\"HHeadDescent\",-$descent); SetOS2Value(\"HHeadDescentIsOffset\",0); SetOS2Value(\"TypoLineGap\",0); Generate($2);' #{old_path} #{new_path}"
7
7
  end
8
8
  end
@@ -2,7 +2,7 @@ module DragonflyFonts
2
2
  module Processors
3
3
  class NormalizeNames
4
4
  def call(font, opts = {})
5
- font.shell_update(ext: :ttf) do |old_path, new_path|
5
+ font.shell_update(ext: font.ext || :ttf) do |old_path, new_path|
6
6
  "#{fontforge_command} -script #{DragonflyFonts::SCRIPT_DIR.join('normalize_names.sh')} #{old_path} #{new_path}"
7
7
  end
8
8
  end
@@ -3,7 +3,7 @@ module DragonflyFonts
3
3
  # The OpenType Sanitiser (OTS) parses and serialises OpenType files (OTF, TTF) and WOFF and WOFF2 font files, validating them and sanitising them as it goes.
4
4
  class OtSanitise
5
5
  def call(content, _opts = {})
6
- content.shell_update do |old_path, new_path|
6
+ content.shell_update(ext: content.ext || :ttf) do |old_path, new_path|
7
7
  "#{ot_sanitise_command} #{old_path} #{new_path}"
8
8
  end
9
9
  end
@@ -5,7 +5,7 @@ module DragonflyFonts
5
5
  ascent = opts.fetch(:ascent, '')
6
6
  descent = opts.fetch(:descent, '')
7
7
 
8
- content.shell_update do |old_path, new_path|
8
+ content.shell_update(ext: content.ext || :ttf) do |old_path, new_path|
9
9
  "#{dimensions_script} #{old_path} #{new_path} #{Shellwords.escape(ascent)} #{Shellwords.escape(descent)}"
10
10
  end
11
11
  end
@@ -28,7 +28,7 @@ module DragonflyFonts
28
28
  }
29
29
 
30
30
  def call(font, values = {})
31
- font.shell_update do |old_path, new_path|
31
+ font.shell_update(ext: font.ext || :ttf) do |old_path, new_path|
32
32
  "#{fontforge_command} -lang=ff -c 'Open($1); #{command_string(values)} Generate($2);' #{old_path} #{new_path}"
33
33
  end
34
34
  end
@@ -7,7 +7,7 @@ module DragonflyFonts
7
7
  upos = opts.fetch(:upos, '')
8
8
  uwidth = opts.fetch(:uwidth, '')
9
9
 
10
- content.shell_update do |old_path, new_path|
10
+ content.shell_update(ext: content.ext || :ttf) do |old_path, new_path|
11
11
  "#{underline_script} #{old_path} #{new_path} #{Shellwords.escape(upos)} #{Shellwords.escape(uwidth)}"
12
12
  end
13
13
  end
@@ -6,7 +6,7 @@ module DragonflyFonts
6
6
  # when 1 then the vertical width will be incremented by the first
7
7
  # when 2 then the vertical width will be scaled by <first argument>/100.0.
8
8
  def call(content, width, relative = 1)
9
- content.shell_update do |old_path, new_path|
9
+ content.shell_update(ext: content.ext || :ttf) do |old_path, new_path|
10
10
  "#{fontforge_command} -lang=ff -c 'Open($1); SelectWorthOutputting(); SetWidth(#{width},#{relative}); Generate($2);' #{old_path} #{new_path}"
11
11
  end
12
12
  end
@@ -2,7 +2,7 @@ module DragonflyFonts
2
2
  module Processors
3
3
  class TtfAutohint
4
4
  def call(font)
5
- font.shell_update do |old_path, new_path|
5
+ font.shell_update(ext: font.ext || :ttf) do |old_path, new_path|
6
6
  "#{ttfautohint_command} --strong-stem-width='' --windows-compatibility --composites #{old_path} #{new_path}"
7
7
  end
8
8
  end
@@ -2,7 +2,7 @@ module DragonflyFonts
2
2
  module Processors
3
3
  class WebFriendly
4
4
  def call(font, opts = {})
5
- font.shell_update(ext: :ttf) do |old_path, new_path|
5
+ font.shell_update(ext: font.ext || :ttf) do |old_path, new_path|
6
6
  "#{fontforge_command} -script #{DragonflyFonts::SCRIPT_DIR.join('webfonts.pe')} #{old_path} #{new_path}"
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module DragonflyFonts
2
- VERSION = '0.0.6'.freeze
2
+ VERSION = '0.0.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragonfly_fonts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-24 00:00:00.000000000 Z
11
+ date: 2017-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dragonfly
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  version: '0'
180
180
  requirements: []
181
181
  rubyforge_project:
182
- rubygems_version: 2.4.5.1
182
+ rubygems_version: 2.5.2
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: Wraps common font-related tasks into Dragonfly analysers and processors.