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
+10
View File
@@ -14,6 +14,16 @@ describe Squib::Deck do
end
end
context '#pt' do
it 'converts inches properly' do
expect(deck.points(1)).to eq 4.166666666666667
end
it 'handles strings too' do
expect(deck.points('1')).to eq 4.166666666666667
end
end
context '#cm' do
it 'converts inches properly' do
expect(deck.cm(1)).to eq 118.1102361