dragonfly_fonts 0.0.6 → 0.0.7
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 +4 -4
- data/lib/dragonfly_fonts/analysers/ot_sanitise.rb +1 -1
- data/lib/dragonfly_fonts/processors/correct_metrics.rb +1 -1
- data/lib/dragonfly_fonts/processors/normalize_names.rb +1 -1
- data/lib/dragonfly_fonts/processors/ot_sanitise.rb +1 -1
- data/lib/dragonfly_fonts/processors/set_dimensions.rb +1 -1
- data/lib/dragonfly_fonts/processors/set_ttf_names.rb +1 -1
- data/lib/dragonfly_fonts/processors/set_underline.rb +1 -1
- data/lib/dragonfly_fonts/processors/set_width.rb +1 -1
- data/lib/dragonfly_fonts/processors/ttf_autohint.rb +1 -1
- data/lib/dragonfly_fonts/processors/web_friendly.rb +1 -1
- data/lib/dragonfly_fonts/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47b03f7d6665ca17df9e046dbe39f1bd9cfee206
|
4
|
+
data.tar.gz: 750a4d3c92fc8112f40e59e323998a9b5825d31e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '039a6424ae119d1d57a82697b4a3a9e9dc475daae788b82c8b2a0db45ae4169bff528f1af9bb1986ddafc75959f15bd5f63bc4a0ac2fb3c16416dd68afe3671c'
|
7
|
+
data.tar.gz: 12c489663c7bb58bb6d8fdce28c04c33a872e818f8415b31af220a1952ab58eb106be10368c9656c7cbf608793f2e535573e8fb43e172d1659efa580f0e190f9
|
@@ -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
|
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.
|
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-
|
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.
|
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.
|