Library suggestions for making text look nice

I’m making a program that will have lots of images and text embedded, and I was wondering if there are any libraries anyone could suggest to make paragraphs of text display as nicely as possible. I know how to use text wrapping but it still looks a little clumsy. Also if there is any way to have my computer render text as text so I can highlight it, that would be nice, though I don’t think that’s possible.
I know I can just make a program that will generate html with the images and text but I would prefer a different approach for the flexibility.

1 Like

Once I coded a twitter text box to try to comply with twitter demands on displaying tweets.
You have to link all mentions and hashtags and links. To do so I built this text box that wraps the text and actually split every word and reposition it so I could treat special words individually.
It’s not done, there are some features not implemented yet, but it may be a start. The way it is working now, if you input:

String s = "#Great @quora Q & A about how completely implausible #Aaron Sorkin's portrayal o fwomen is in \"The Newsroom\": http://slate.me/RCL2u1";

(that’s an actual tweet text)

it gives you this:

with all the links working, the only color changed were the links (the background change was a choice, anything could be done instead) , but it could be easily adapted to whatever need as words are already individualized and with mouseOver check.
There is some overhead to deal with twitter indexes (twitter sends you the string along with indexes of each entities presents in it, like links mentions and so on), so, as it is what to do with each word is defined by those indexes in the code, but that also would be easily adaptable once the individualization of each word is done, as it is.
It is two tabs, the bigger has almost 500 lines, but is very commented and no t hard to get i think…
I could share if wanted.
Disclaimer: I’m not an experienced coder. :slight_smile:

Somewhere in the midlle it goes like this ; )



2 Likes