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
+5
View File
@@ -15,6 +15,11 @@ describe Squib::Args::UnitConversion do
expect(subject.parse('1 in')).to eq(300)
end
it 'does pt' do
expect(subject.parse('1pt')).to eq(4.166666666666667)
expect(subject.parse('1pt ')).to eq(4.166666666666667)
end
it 'does cm' do
expect(subject.parse('1cm')).to eq(118.1102361)
expect(subject.parse('1cm ')).to eq(118.1102361)