dragonfly_harfbuzz 0.0.2 → 0.0.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
  SHA1:
3
- metadata.gz: 2dade1afe3d3e68118083ef3d1a8cb32f1a9d68c
4
- data.tar.gz: 6272bd78b89d2a10a2af686be45da02eb3090f04
3
+ metadata.gz: 938040a9d11a528c6791eacac7035203cc7712e3
4
+ data.tar.gz: ab57cbc3008940618ff9ff1141ffbce2b6b60d87
5
5
  SHA512:
6
- metadata.gz: 976761177bd268266e083738538b1a6535d2239e687439b26c51e5d33bde47b6bff699f7e707b2e3b8522f33d0ec4453fe984c979d794e7450e9d9cd1a7476b4
7
- data.tar.gz: 8e767fb5807961d28beb87b5f3359f0d5282c53c87c510a79275083d0730a3ba92046f293247ed5457b2a17a989c5c44d6877a6dedd3014282103c89f9ad5f43
6
+ metadata.gz: f5e469b360cdf3fb2cb6b7ae4af1cb61f7625703d4c35a2da08b6349f538df34df29bb1fcd647e1ca40ce339e8a09edeee21619674262f844ad470f1a96b5486
7
+ data.tar.gz: cf8ba966b396fc2033ad690f84d26e26ae21bbef39cb9a77ed3f9b7912b1d52ec0fed357d3205016a7a4e10376c44de485ae5880df3203671d12a6543427487c
@@ -31,6 +31,7 @@ module DragonflyHarfbuzz
31
31
 
32
32
  word_groups = []
33
33
  words_in_line(line).each_with_index do |word, word_index|
34
+ next if word =~ /\s+/
34
35
  word_groups << marked_up_word(word, word_index, line, line_group)
35
36
  end
36
37
 
@@ -45,11 +46,11 @@ module DragonflyHarfbuzz
45
46
  private # =============================================================
46
47
 
47
48
  def lines
48
- text.split(/\n+/)
49
+ text.split /\n+/
49
50
  end
50
51
 
51
52
  def words_in_line line
52
- line.split(/\s+/)
53
+ line.split /(\s+)/
53
54
  end
54
55
 
55
56
  # ---------------------------------------------------------------------
@@ -82,7 +83,7 @@ module DragonflyHarfbuzz
82
83
 
83
84
  previous_words = words_in_line(line)[0...word_index]
84
85
  index_offset = previous_words.join.length
85
-
86
+
86
87
  index_of_first_character = index_offset + 0
87
88
  index_of_last_character = index_offset + word.length - 1
88
89
 
@@ -1,3 +1,3 @@
1
1
  module DragonflyHarfbuzz
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -6,7 +6,7 @@ module DragonflyHarfbuzz
6
6
  let(:app) { test_app.configure_with(:harfbuzz) }
7
7
  let(:processor) { DragonflyHarfbuzz::Processors::HbView.new }
8
8
  let(:font) { Dragonfly::Content.new(app, SAMPLES_DIR.join('Inconsolata.otf')) }
9
- let(:string) { 'foo foo' }
9
+ let(:string) { 'foo foo' }
10
10
  let(:svg) { processor.call(font, string) }
11
11
  let(:call) { DragonflyHarfbuzz::FlattenSvgService.call(string, svg) }
12
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragonfly_harfbuzz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna
@@ -144,7 +144,6 @@ files:
144
144
  - lib/dragonfly_harfbuzz/processors/hb_view.rb
145
145
  - lib/dragonfly_harfbuzz/version.rb
146
146
  - samples/Inconsolata.otf
147
- - samples/test.svg
148
147
  - test/dragonfly_harfbuzz/flatten_svg_service_test.rb
149
148
  - test/dragonfly_harfbuzz/plugin_test.rb
150
149
  - test/dragonfly_harfbuzz/processors/hb_view_test.rb
data/samples/test.svg DELETED
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="416pt" height="313.6pt" viewBox="0 0 416 313.6" version="1.1">
3
- <defs>
4
- <g>
5
- <symbol overflow="visible" id="glyph0-0">
6
- <path style="stroke:none;" d=""/>
7
- </symbol>
8
- <symbol overflow="visible" id="glyph0-1">
9
- <path style="stroke:none;" d="M 19.71875 -159.484375 L 19.71875 0 L 37.890625 0 L 37.890625 -78.34375 L 97.53125 -78.34375 L 97.53125 -93.703125 L 37.890625 -93.703125 L 37.890625 -143.875 L 111.609375 -143.875 L 111.609375 -159.484375 Z M 19.71875 -159.484375 "/>
10
- </symbol>
11
- <symbol overflow="visible" id="glyph0-2">
12
- <path style="stroke:none;" d="M 120.578125 -79.359375 C 120.578125 -94.203125 119.546875 -113.921875 110.84375 -131.078125 C 100.359375 -151.546875 82.171875 -161.03125 64.765625 -161.03125 C 40.953125 -161.03125 7.421875 -142.59375 7.421875 -79.875 C 7.421875 -17.15625 40.453125 2.5625 65.03125 2.5625 C 82.171875 2.5625 100.609375 -7.171875 111.109375 -28.421875 C 119.546875 -45.5625 120.578125 -65.28125 120.578125 -79.359375 Z M 64 -144.390625 C 75.265625 -144.390625 89.09375 -137.734375 96.515625 -119.046875 C 101.890625 -105.734375 102.65625 -90.375 102.65625 -77.0625 C 102.65625 -66.5625 102.140625 -50.171875 95.484375 -36.609375 C 88.0625 -20.984375 75.78125 -14.84375 65.03125 -14.84375 C 47.109375 -14.84375 25.09375 -31.484375 25.09375 -82.171875 C 25.09375 -129.796875 47.359375 -144.390625 64 -144.390625 Z M 64 -144.390625 "/>
13
- </symbol>
14
- </g>
15
- </defs>
16
- <g id="surface1">
17
- <rect x="0" y="0" width="416" height="313.6" style="fill:rgb(100%,100%,100%);fill-opacity:1;stroke:none;"/>
18
- <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
19
- <use xlink:href="#glyph0-1" x="16" y="229.504"/>
20
- <use xlink:href="#glyph0-2" x="144" y="229.504"/>
21
- <use xlink:href="#glyph0-2" x="272" y="229.504"/>
22
- </g>
23
- </g>
24
- </svg>