samples/autoscale_font.rb in squib-0.0.4 vs samples/autoscale_font.rb in squib-0.0.5

- old
+ new

@@ -1,9 +1,9 @@ require 'squib' -# Here's an exmaple of being able to scale a font -# based on the length of individual string. +# Here's an exmaple of being able to scale a font +# based on the length of individual string. # Handy for making minor font scales to fill text boxes. def autoscale(str_array) str_array.inject([]) do | memo, str | case str.length when 0..10 @@ -19,9 +19,9 @@ Squib::Deck.new(cards: 3) do background color: :white title = %w(ShortBig Medium_Length_Name Super_Duper_Long_Name) text str: title, x: 65, y: 400, align: :center, width: 700, - font: 'Arial', font_size: autoscale(title), hint: :red + font: 'Arial', font_size: autoscale(title), hint: :red save prefix: 'autoscale_', format: :png -end \ No newline at end of file +end