Respect DPI settings in text, add pt unit
This has the compatibility impact that all font sizes should be divided by 3 to maintain their same sizes. Based on PR #225. Thanks @felixleong!! Conflicts: bin/squib lib/squib/graphics/text.rb
This commit is contained in:
committed by
Andy Meneely
parent
06970b77a6
commit
f800c131ff
@@ -4,7 +4,7 @@ Squib::Deck.new(cards: 8, layout: 'playing-card.yml') do
|
||||
background color: :cyan
|
||||
rect x: 37, y: 37, width: 750, height: 1050, fill_color: :black, radius: 25
|
||||
rect x: 75, y: 75, width: 675, height: 975, fill_color: :white, radius: 20
|
||||
text str: ('A'..'Z').to_a, layout: :bonus_ul, font: 'Sans bold 100'
|
||||
text str: ('A'..'Z').to_a, layout: :bonus_ul, font: 'Sans bold 33'
|
||||
|
||||
# Defaults are sensible
|
||||
hand # saves to _output/hand.png
|
||||
|
||||
@@ -7,7 +7,7 @@ Squib::Deck.new(width: 825, height: 1125, cards: 16) do
|
||||
rect x: 38, y: 38, width: 750, height: 1050,
|
||||
x_radius: 38, y_radius: 38, stroke: 3.0, dash: '4 4'
|
||||
|
||||
text str: (1..16).to_a, x: 220, y: 78, font: 'Arial 54'
|
||||
text str: (1..16).to_a, x: 220, y: 78, font: 'Arial 18'
|
||||
|
||||
# Here's what a regular save_png looks like for just the first card
|
||||
save_png range: 0, prefix: 'save_png_'
|
||||
|
||||
@@ -7,7 +7,7 @@ Squib::Deck.new(cards: 4) do
|
||||
rect fill_color: '#DED4B9', x: 78, y: 78,
|
||||
width: '2.25in', height: '3.25in', radius: 32
|
||||
text str: %w(Grifter Thief Thug Kingpin),
|
||||
font: 'Helvetica,Sans weight=800 120',
|
||||
font: 'Helvetica,Sans weight=800 40',
|
||||
x: 78, y: 78, width: '2.25in', align: :center
|
||||
svg file: 'spanner.svg', x: (825 - 500) / 2, y: 500, width: 500, height: 500
|
||||
|
||||
|
||||
Reference in New Issue
Block a user