Can you help me?? I need to draw one line text in prawn pdf with responsible text size which depends on text characters count... Less chacters count -> bigger text size.
bounding_box([header_text_left_margin, @height + 26], :width=>270, :height=>250) do
text developer_position, :size => 40, :leading => 1
end
Have a look at the Prawn manual page 38 "text/text_box_overflow.rb". There you will find that an option
:shrink_to_fitexists which will do what you want. Just make sure that the initial font size is large enough.