Customizing word wrap

General TRichView support forum. Please post your questions here
Post Reply
blsstdok
Posts: 25
Joined: Tue Jun 07, 2011 2:36 pm

Customizing word wrap

Post by blsstdok »

We have need to override how wordwrapping is calculated in the document.

One option might be to implement a "minimum raggedness" wrapping algorithm, like described here: http://en.wikipedia.org/wiki/Word_wrap# ... raggedness -- this could solve our needs.

However, ideally, I would like to be able to simply decide where word wrapping is done based on the "weight" of the lines, so that something like this:

blah blah blah blah blah
blah blah blah blah blah
blah blah blah blah blah
blah

would instead show as:

blah blah blah blah
blah blah blah blah
blah blah blah blah
blah blah blah blah

Obviously, the actuial width of the words (considering font size differences, etc) would need to be factored in.

Can you suggest for me a starting point on doing this in richview?
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Not supported yet. And it would be not easy to implement balanced lines.
Post Reply