Add variable length text to image with different text configuration by line
We are dealing with image a lot lately and we were able to write text with different text configuration like, font, fontsize, color etc., on each line. Everything is going good so far.
Now, our requirement is to read text from db (one to many lines) which will be variable length by user and need to somehow fit everything in that image without text overflowing. Possibily adding line breakswhich will still use same text configuration. This can lead to more than 1 line on the image. Next, read seond line from DB and repeat the same process except this time text configuration may or may not be same.
Started researching on using CFImage tag but will not give me height and width of the text so I can determine the coordinates of the next line.
Also, tried to do some research on awt* classes and methods but stuck with same problem.
I'm working with CF18 and cannot seems to find anything which can solve my problem unless I'm approching this all wrong.
I'm looking for guidence on how this can be tackled. Is it by investing in some softwate or can use any third party libraries etc.,? I'm going to do my own POC if I know what are available in market. I did some quick google search on java libraries and came up empty.
Thank You so much in advance.
