rghost
rghost copied to clipboard
text_align: :center in text area doesn't produce accurate word wrapping
The word wrapping in text area worked awesome when using text_align left or right. But with text_align center it goes up to twice the width going outside the text area
The code snippet that I am using
doc = RGhost::Document.new
doc.define_tags do
tag :font1, name: 'Helvetica', size: 14, color: '#0000FF'
end
doc.frame x: 6, y: 1, width: 1, height: 2, content: { fill: '#AAFA49'}
doc.text_area '<font1>test test test test hello awesome test yohohoho!!!'\
'abracadabra suntali testing word wrap</font1>', x: 6, y:3,
width: 1, row_height: 0.25, text_align: :center
left align output is as follows
center align output is as follows
Can remove <font1>
tag out of the string and share the result?
Same results without the <font>
tag. Left align works but not center align
left align
center align
Hey Man,
Any chance that you had time to spend on this?
Thanks!
Thank you for your earlier response.
I was able to add <br/>
tags to the text_val with the help of rmagick gem which then rendered word wrap just the way I wanted.