Is there a way to determine where the word wrap will take place (specifically what is the text that is starting on the second line?)
Thanks
word wrapping detection
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: word wrapping detection
Nope not without doing all the calculations yourself!
It gets worse if you specify a full -size for caption but not pointsize. Then the font pointsize will become variable for best fit! That will make it even harder to determine!
Look at Determining Font Metrics
http://www.imagemagick.org/Usage/text/#font_info
this will give you a way to see how long a particular string will be rendered in a specific situation.
It gets worse if you specify a full -size for caption but not pointsize. Then the font pointsize will become variable for best fit! That will make it even harder to determine!
Look at Determining Font Metrics
http://www.imagemagick.org/Usage/text/#font_info
this will give you a way to see how long a particular string will be rendered in a specific situation.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: word wrapping detection
jpotter wrote:Is there a way to determine where the word wrap will take place (specifically what is the text that is starting on the second line?)
Thanks
Why not just put a \n where you want the break to be!
convert -background lightblue -size 200x -fill blue -font candice label:"This is test 1\nand This is test2\nand test3" test.png
The longest line determines the pointsize for the given width. Thus you know exactly what letter will be at the beginning of each line