text2svg 0.4.1 → 0.4.2

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: bc9791dd9a1ca2e7c574f2d925ee0b60c54b6d6e
4
- data.tar.gz: 558e0e2c3812fa6442d88740cf85edfd7a07f6b5
3
+ metadata.gz: 93c8994bfc2b60b834d4eac55340d47214aa9928
4
+ data.tar.gz: 0040028716fbdb275343da6654aec6b171e1d24d
5
5
  SHA512:
6
- metadata.gz: 251968686481b39e1158be711a606bb9db0981310341f0840ec71535992fdcb79a47f919bd70ea60cf35e3b910449d02b5e10670a97a622570e90856a757206b
7
- data.tar.gz: 01d3f3a4cf6201c176d3e4640247e7de661a4cb633e8db8e2e4514533a3be53dea485475c2cc98a92650a636a767e198e0a3aee929e2077de3dbacee808c13b7
6
+ metadata.gz: 6d9ebb1df54bda25a60df37cf11637c9a3a71f7b92ed29690c23e8aa6b029fdefb9ecf00e9b6d18231cc8a16faad68bbdaf2570ba2c5073aa66568bdb815f803
7
+ data.tar.gz: 2a92007b9da174fb0b9b9326f5272951950d198f76b6cc2aad85188a05125f7194ab0543c2fb80ebc9526da5ac07d7d01b6c159db401fa5c1b5e76def748c5a7
@@ -136,16 +136,14 @@ module Text2svg
136
136
 
137
137
  y = 0r
138
138
  output = ''
139
- line_height = f.line_height
140
-
141
139
  output << %(<g #{option.attribute}>\n) if option.attribute
142
140
 
143
141
  lines.zip(width_by_line).each_with_index do |(line, line_width), index|
144
142
  x = 0r
145
143
  y += if index == 0
146
- line.map { |cs| cs.metrics[:horiBearingY] }.max || 0
144
+ f.face[:size][:metrics][:ascender]
147
145
  else
148
- line_height
146
+ f.line_height
149
147
  end
150
148
  before_char = nil
151
149
 
@@ -181,7 +179,7 @@ module Text2svg
181
179
  Content.new(
182
180
  output,
183
181
  (max_width + option_width).to_i,
184
- (y + (lines.last.map { |cs| cs.metrics[:height] - cs.metrics[:horiBearingY] }.max || 0)).to_i,
182
+ y.to_i - f.face[:size][:metrics][:descender] * 1.2,
185
183
  notdef_indexes
186
184
  )
187
185
  end
@@ -1,3 +1,3 @@
1
1
  module Text2svg
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: text2svg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss