Update text_options.rb sample, and expected output
|
|
@ -23,12 +23,12 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
|
|||
text str: 'Font string sizes can be overridden per card.', x: 65, y: 350,
|
||||
font: 'Impact 36', font_size: [16, 20, 24]
|
||||
|
||||
text str: 'This text has fixed width, fixed height, center-aligned, middle-valigned, has a red hint, and "smart quotes"',
|
||||
text str: 'This text has fixed width, fixed height, center-aligned, middle-valigned, and has a red hint',
|
||||
hint: :red,
|
||||
x: 65, y: 400,
|
||||
width: 300, height: 125,
|
||||
align: :center, valign: 'MIDDLE', # these can be specified with case-insenstive strings too
|
||||
font: 'Serif 16', quotes: [:smart,:smart, :dumb]
|
||||
font: 'Serif 16'
|
||||
|
||||
extents = text str: 'Ink extent return value',
|
||||
x: 65, y: 550,
|
||||
|
|
@ -93,6 +93,5 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
|
|||
valign: :bottom,
|
||||
font: 'Serif 18', hint: :cyan
|
||||
|
||||
|
||||
save prefix: 'text_', format: :png
|
||||
end
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ cairo: translate([65, 400])
|
|||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["This text has fixed width, fixed height, center-aligned, middle-valigned, has a red hint, and \"smart quotes\""])
|
||||
pango: text=(["This text has fixed width, fixed height, center-aligned, middle-valigned, and has a red hint"])
|
||||
pango: width=([307200])
|
||||
pango: height=([128000])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
|
|
@ -366,7 +366,7 @@ cairo: translate([65, 400])
|
|||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["This text has fixed width, fixed height, center-aligned, middle-valigned, has a red hint, and \"smart quotes\""])
|
||||
pango: text=(["This text has fixed width, fixed height, center-aligned, middle-valigned, and has a red hint"])
|
||||
pango: width=([307200])
|
||||
pango: height=([128000])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
|
|
@ -389,7 +389,7 @@ cairo: translate([65, 400])
|
|||
cairo: rotate([0])
|
||||
cairo: move_to([0, 0])
|
||||
pango: font_description=([MockDouble])
|
||||
pango: text=(["This text has fixed width, fixed height, center-aligned, middle-valigned, has a red hint, and \"smart quotes\""])
|
||||
pango: text=(["This text has fixed width, fixed height, center-aligned, middle-valigned, and has a red hint"])
|
||||
pango: width=([307200])
|
||||
pango: height=([128000])
|
||||
pango: wrap=([#<Pango::Layout::WrapMode word-char>])
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 76 KiB |
|
|
@ -73,7 +73,7 @@ describe "Squib samples" do
|
|||
log = StringIO.new
|
||||
mock_cairo(log)
|
||||
load sample
|
||||
overwrite_sample(sample, log) # Use TEMPORARILY once happy with the new sample log
|
||||
# overwrite_sample(sample, log) # Use TEMPORARILY once happy with the new sample log
|
||||
test_file_str = File.open(sample_regression_file(sample), 'r:UTF-8').read
|
||||
expect(log.string).to eq(test_file_str)
|
||||
end
|
||||
|
|
|
|||