Hi Rajeev,

Rajeev J Sebastian wrote:

As I have said earlier, I am developing a custom Break Iterator for use with Malayalam text. I have a couple of problems I need to sort out with regard to text breaking. I have attached an archive of 2 .png files which demonstrate the problems:

1) There is an unusual space at the end of justified text when the text is broken by the break iterator (e.g., 3rd line in snapshot4.png. also, same thing in most other lines in the screenshot). Is there any way to get rid of the space and get the text to be against the right page border ?

2) Unusual amount of space between a Malayalam character and punctuation marks in justified text (for e.g., see the comma in the middle of the 2nd line from bottom in snapshot4.png). Can my break iterator help to reduce this space, at least similiar to the spacing in the completely left aligned case ?

1) + 2) Well, I can keep guessing what's going on here (as I already did some weeks ago), or you can provide me with your break iterator code and any other changes you made and I'll have a look. Since option 1 is definitely a waste of time, I would suggest to choose option 2.


3) Is there any way for the break iterator to provide multiple breaks and sw to use the one with best formatting ? As in line 2 and 3 of snapshot4.png, some more of the text from line 3 can go to the previous line.

The problem in Malayalam is, since it allows such long words, and there are so many line break possibilities, it can lead to much better formatting.

3) In this case your break iterator should return a position > than it actually does. In SwTxtGuess::Guess() getLineBreak is called with a parameter nCutPos, which is the position of the first character that does not fit to the line anymore. Starting from this position, getLineBreak searches backward for the first line break opportunity up to the beginning of the line. Looks like either nCutPos is wrong or your break iterator does not work correctly.

Also, I should tell you ... my break iterator, returns a line break result with BreakType::WORDBOUNDARY, even though it is not really a word boundary. The BreakType::HYPHENATION is no good for me, as it causes hyphens to be shown.

That should be ok.


Regards,
Rajeev J Sebastian

Regards,

Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to