squib
squib copied to clipboard
SVGs are all lower than they should be
Describe the bug Embedded SVGs are vertically lower than they should be
To Reproduce
Create the following script:
require 'squib'
require 'game_icons'
Squib::Deck.new(cards: 3) do
use_layout file: 'economy.yml'
background color: 'white'
cut_zone
safe_zone
LOVE = GameIcons.get('skoll/hearts').
recolor(fg: 'black', bg: 'white', fg_opacity: 1.0, bg_opacity: 0.0).
string
descs = [
"Here is text without an embed",
"Here is text with {l} embedded",
"{l}"
]
rect layout: :description
text layout: :description, str: descs do |embed|
embed.svg key: '{l}', width: 32, height: 32, data: LOVE
end
save format: :png
end
Run it with ruby deck.rb
Expected behavior SVGs should be inline with text
Screenshots
Environment
- OS: Windows 11
- Ruby version 3.3 (also occurred with 3.2)
- Gemfile.lock: Gemfile.lock.txt
Additional context A text string that is entirely replaced with embeds does not seem to be lowered.
Check the following:
- [x] I have updated Squib to the latest version.
- [x] I have checked the Squib issues backlog for something similar
- [x] I have attempted to make a minimal script demonstrating my problem
- [x] I have reviewed the Squib Docs and there's still a problem
Of course I notice #348 after posting this...