dragonfly_fonts 0.0.7 → 0.0.8

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: 47b03f7d6665ca17df9e046dbe39f1bd9cfee206
4
- data.tar.gz: 750a4d3c92fc8112f40e59e323998a9b5825d31e
3
+ metadata.gz: 8c4f51e0a7125d4d21c70ccc57ee4e52dc72f17c
4
+ data.tar.gz: 2db35ec845bc028784147581c92412fadbd78e1e
5
5
  SHA512:
6
- metadata.gz: '039a6424ae119d1d57a82697b4a3a9e9dc475daae788b82c8b2a0db45ae4169bff528f1af9bb1986ddafc75959f15bd5f63bc4a0ac2fb3c16416dd68afe3671c'
7
- data.tar.gz: 12c489663c7bb58bb6d8fdce28c04c33a872e818f8415b31af220a1952ab58eb106be10368c9656c7cbf608793f2e535573e8fb43e172d1659efa580f0e190f9
6
+ metadata.gz: b592be81310cdc581c6e3a8044ff7e94a141edf09414eedab59654b7707430c74b4f4e555cb1e77f26d0fd39a449013fa34d01c81f75b90a108e49f90c8ef396
7
+ data.tar.gz: 1ec958c9a2fc62322031390101d74a992ec82ad91063c0296d07c8fb6ae886bd6e831617fce182156066bf0299319be545a8a8f31794a41dd37e1599d92ef823
@@ -10,7 +10,7 @@ module DragonflyFonts
10
10
  private
11
11
 
12
12
  def ot_sanitise_command
13
- 'ot-sanitise'
13
+ 'ots-sanitize'
14
14
  end
15
15
  end
16
16
  end
@@ -4,9 +4,20 @@ module DragonflyFonts
4
4
  def call(font, glyph, opts = {})
5
5
  format = opts.fetch(:format, :svg)
6
6
 
7
- font.shell_update(ext: format) do |old_path, new_path|
8
- "#{fontforge_command} -lang=ff -c 'Open($1); Select(\"#{glyph}\"); Export(\"#{new_path}\");' #{old_path}"
7
+ font.shell_update ext: format do |old_path, new_path|
8
+ "#{fontforge_command} -lang=ff -c 'Open($1); Select($2); Export($3);' #{old_path} #{glyph} #{new_path}"
9
9
  end
10
+
11
+ font.meta['format'] = format.to_s
12
+ font.ext = format
13
+ font.meta['mime_type'] = nil # don't need it as we have ext now
14
+ end
15
+
16
+ def update_url(url_attributes, glyph, opts = {})
17
+ format = opts.fetch(:format, :svg)
18
+
19
+ url_attributes.ext = format.to_s
20
+ url_attributes.glyph = glyph
10
21
  end
11
22
 
12
23
  private # =============================================================
@@ -15,7 +15,7 @@ module DragonflyFonts
15
15
  private # =============================================================
16
16
 
17
17
  def ot_sanitise_command
18
- 'ot-sanitise'
18
+ 'ots-sanitize'
19
19
  end
20
20
  end
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module DragonflyFonts
2
- VERSION = '0.0.7'.freeze
2
+ VERSION = '0.0.8'.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.7
4
+ version: 0.0.8
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-07 00:00:00.000000000 Z
11
+ date: 2017-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dragonfly