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:
Seh Hui, Leong
2017-10-05 16:37:46 -04:00
committed by Andy Meneely
parent 06970b77a6
commit f800c131ff
43 changed files with 144 additions and 111 deletions
+2 -2
View File
@@ -4,11 +4,11 @@ Squib::Deck.new cards: 1 do
background color: '#252322'
rect fill_color: '#0B3736',
x: 38, y: 38, width: 750, height: 1050, radius: 38
text str: 'Robot Golem', font: 'True Crimes, Sans 72',
text str: 'Robot Golem', font: 'True Crimes, Sans 24',
align: :center, x: 75, width: :deck, color: '#DFDFE1', y: 90
svg file: 'auto-repair.svg', x: 75, y: 75, width: 100, height: :scale
svg file: 'robot-golem.svg', x: 75, y: 300, width: 675, height: :scale
text str: 'Draw two cards', font: 'Serif 36',
text str: 'Draw two cards', font: 'Serif 12',
align: :center, width: :deck, color: '#DFDFE1', y: 1000
save_png prefix: 'part2_'
end
+3 -3
View File
@@ -6,7 +6,7 @@ backdrop:
width: 750
height: 1050
title:
font: 'True Crimes, Sans 72'
font: 'True Crimes, Sans 24'
align: center
color: '#DFDFE1'
x: 75
@@ -27,8 +27,8 @@ art:
width: 675
height: 675
power:
font: 'Serif 36'
font: 'Serif 12'
align: center
width: 825
color: '#DFDFE1'
y: 1000
y: 1000