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
@@ -5,7 +5,7 @@ require 'squib'
|
||||
Squib::Deck.new(layout: 'fantasy.yml') do
|
||||
background color: 'white'
|
||||
|
||||
set font: 'Times New Roman,Serif 32'
|
||||
set font: 'Times New Roman,Serif 10.5'
|
||||
hint text: '#333' # show extents of text boxes to demo the layout
|
||||
|
||||
text str: 'fantasy.yml', layout: :title
|
||||
@@ -26,7 +26,7 @@ end
|
||||
Squib::Deck.new(layout: 'economy.yml') do
|
||||
background color: 'white'
|
||||
|
||||
set font: 'Times New Roman,Serif 32'
|
||||
set font: 'Times New Roman,Serif 10.5'
|
||||
hint text: '#333' # show extents of text boxes to demo the layout
|
||||
|
||||
text str: 'economy.yml', layout: :title
|
||||
@@ -54,8 +54,8 @@ end
|
||||
|
||||
Squib::Deck.new(layout: 'playing-card.yml') do
|
||||
background color: 'white'
|
||||
text str: "A\u2660", layout: :bonus_ul, font: 'Sans bold 100', hint: :red
|
||||
text str: "A\u2660", layout: :bonus_lr, font: 'Sans bold 100', hint: :red
|
||||
text str: "A\u2660", layout: :bonus_ul, font: 'Sans bold 33', hint: :red
|
||||
text str: "A\u2660", layout: :bonus_lr, font: 'Sans bold 33', hint: :red
|
||||
text str: 'artwork here', layout: :art, hint: :red
|
||||
save_png prefix: 'layouts_builtin_playing_card_'
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@ subtitle:
|
||||
height: 60
|
||||
align: left
|
||||
valign: middle
|
||||
font_size: 25
|
||||
font_size: 8
|
||||
# This one is completely new
|
||||
description:
|
||||
extends: subtitle
|
||||
|
||||
@@ -44,8 +44,8 @@ end
|
||||
|
||||
# Built-in layouts are easy to use and extend
|
||||
Squib::Deck.new(layout: 'playing-card.yml') do
|
||||
text str: "A\u2660", layout: :bonus_ul, font: 'Sans bold 100', hint: :red
|
||||
text str: "A\u2660", layout: :bonus_lr, font: 'Sans bold 100', hint: :red
|
||||
text str: "A\u2660", layout: :bonus_ul, font: 'Sans bold 33', hint: :red
|
||||
text str: "A\u2660", layout: :bonus_lr, font: 'Sans bold 33', hint: :red
|
||||
text str: 'artwork here', layout: :art, hint: :red
|
||||
save_png prefix: 'layout_builtin_playing_card_'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user