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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c4f51e0a7125d4d21c70ccc57ee4e52dc72f17c
|
4
|
+
data.tar.gz: 2db35ec845bc028784147581c92412fadbd78e1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b592be81310cdc581c6e3a8044ff7e94a141edf09414eedab59654b7707430c74b4f4e555cb1e77f26d0fd39a449013fa34d01c81f75b90a108e49f90c8ef396
|
7
|
+
data.tar.gz: 1ec958c9a2fc62322031390101d74a992ec82ad91063c0296d07c8fb6ae886bd6e831617fce182156066bf0299319be545a8a8f31794a41dd37e1599d92ef823
|
@@ -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
|
8
|
-
"#{fontforge_command} -lang=ff -c 'Open($1); Select(
|
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 # =============================================================
|
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.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
|
+
date: 2017-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dragonfly
|