dragonfly_harfbuzz 1.1.2 → 1.1.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8770ccbb7bfdfe8b736a4e2074118fe6229161dff997af7d72eba97ae5c2bade
|
4
|
+
data.tar.gz: 248e3e3d33af72f6362eb02fa733e3b97ee92c101f47d27323e0708b3ec40cb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 936adfbd294352ec1f41301d948fe06ea1d7045a47c68a053bef53bea718b9d7953baac758070afb066c593a035b6f6642402956cfd8a8d31a8b81a6731de6c9
|
7
|
+
data.tar.gz: 91a5e0d69b79347ecea40d1a8502ef4a56a2cb21a5b8ef19c90e4bc3786cbeeff8f3ffb202f3cbeedd465b621614ef3153e0288e4d2f75bedd47a458f394dd2f
|
data/CHANGELOG.md
CHANGED
@@ -25,7 +25,7 @@ module DragonflyHarfbuzz
|
|
25
25
|
--output-format=#{format}
|
26
26
|
]
|
27
27
|
|
28
|
-
args << "--text
|
28
|
+
args << "--text=#{Shellwords.escape(str)}" unless options.key?('unicodes')
|
29
29
|
|
30
30
|
options.reject { |k, _| %w[format markup_svg flatten_svg split_paths].include?(k.to_s) }.each do |k, v|
|
31
31
|
args << "--#{k.to_s.tr('_', '-')}=#{Shellwords.escape(v)}" if v.present?
|
@@ -46,7 +46,7 @@ module DragonflyHarfbuzz
|
|
46
46
|
content
|
47
47
|
end
|
48
48
|
|
49
|
-
def update_url(attrs,
|
49
|
+
def update_url(attrs, _str = '', options = {})
|
50
50
|
format = options.fetch('format', 'svg').to_s
|
51
51
|
attrs.ext = format
|
52
52
|
end
|
@@ -54,11 +54,11 @@ module DragonflyHarfbuzz
|
|
54
54
|
private
|
55
55
|
|
56
56
|
def str_from_unicodes(unicodes)
|
57
|
-
unicodes.split(
|
57
|
+
unicodes.split(',').map do |hexstring|
|
58
58
|
begin
|
59
|
-
Array(hexstring).pack(
|
60
|
-
rescue
|
61
|
-
|
59
|
+
Array(hexstring).pack('H*').force_encoding('utf-16be').encode('utf-8')
|
60
|
+
rescue StandardError
|
61
|
+
' '
|
62
62
|
end
|
63
63
|
end.join
|
64
64
|
end
|
@@ -5,11 +5,11 @@ describe DragonflyHarfbuzz::Processors::HbView do
|
|
5
5
|
let(:content) { Dragonfly::Content.new(app, SAMPLES_DIR.join('sample.otf')) }
|
6
6
|
let(:processor) { DragonflyHarfbuzz::Processors::HbView.new }
|
7
7
|
|
8
|
-
let(:string) { '
|
8
|
+
let(:string) { "F'OO" }
|
9
9
|
|
10
10
|
describe 'SUPPORTED_FORMATS' do
|
11
11
|
DragonflyHarfbuzz::SUPPORTED_FORMATS.each do |format|
|
12
|
-
unless File.
|
12
|
+
unless File.exist?(SAMPLES_DIR.join("sample.#{format}"))
|
13
13
|
it(format) { skip "sample.#{format} does not exist, skipping" }
|
14
14
|
next
|
15
15
|
end
|
@@ -49,8 +49,8 @@ describe DragonflyHarfbuzz::Processors::HbView do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
describe 'str as unicodes' do
|
52
|
-
before { processor.call(content, nil, unicodes:
|
53
|
-
it { content.data.must_include
|
54
|
-
it { content.data.must_include
|
52
|
+
before { processor.call(content, nil, unicodes: '0042,0043', flatten_svg: true) }
|
53
|
+
it { content.data.must_include '<svg character="B" class="character"' }
|
54
|
+
it { content.data.must_include '<svg character="C" class="character"' }
|
55
55
|
end
|
56
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dragonfly_harfbuzz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|