Johannes wrote:
On Tue, Sep 29, 2009 at 08:03:53AM +0000, corvid wrote:
I just learned that some languages don't use spaces but can only break in certain places, and that they tend to insert Zero Width Space to make life easier for software that doesn't know the complex rules.
So here's a quick little patch for them: http://www.dillo.org/test/zero_width_space.patch
Looks good to me, but do we really need to add a space? Wouldn't it be enough to just start a new word? At least dw-example seems to wrap words with textblock->addSpace(wordStyle); commented out.
I was thinking that it would be good to remember that it's there so that the iterator could be made to do the right thing for copying and pasting text, but maybe that's too much of a picky corner case akin to soft hyphens. (And maybe stripping them out would make life simpler for findtext anyway.)
PS I did just start trying to move the ideographic test to dw, but I got stuck when I realized that I can't exactly call fltk's utf8decode() directly in Textblock, and am not excited by the idea of calling it through Layout.
I think we could make the utf8 methods in fltkplatform.cc static members.
In this case, that would save us... carrying along a this pointer that we weren't using? Does it save an indirection? (in any case, maybe I should static-ize all of our current fltkplatform functions that just call fltk functions)