Rajeev J Sebastian wrote:
On Friday 06 January 2006 18:56, Frank Meies wrote:
Ok, next try. Let's have a look at your example:
ga + cd + la <space> sa
Start with the cursor in front of ga (position 0 in the unicode string).
Pressing -> should advance the cursor to position 3 in the unicode
string (because 1 and 2 aren't valid cursor positions). Have a look at
SwCntntNode::GoNext(), there is a call to the nextCharacters() function
of the breakiterator. Before the call nPos should be 0, after the call
nPos should be 3. Can you verify this?
I will get on it, and get you some results :)
One more question: There seem to be some 'hidden' characters in your
document. Set the cursor to the start of the last line of text, press ->
5 times. Press backspace once. A character in the unicode string will be
deleted, but there is not visible effect.
It is probably a ZWJ or ZWNJ which are pretty much essential in typing
Malayalam/Indic texts.
Yes, you are right, it's a 0x200D (ZWJ).
Looking at the source code and the document that you had referenced,
there is a kern array which stores the gaps between character (or
character clusters ?). The cursor uses this for computing the widths for
travelling ? Does the rendering engine also use this same kern array for
the purpose?
yes.
Hmm, thats wierd ... in that case, there must be some additional processing
done after the value is retrieved from the kern array correct ?
For painting, we do this: Get the kern array from vcl by calling
GetTextArray(), add the spacings for justified alignment, pass the
modified kern array to the DrawTextArray() function.
For cursor travelling, we obtain the kern array the same way and add the
spacing if justified alignment is set. After this, we have the x
coordinate for the cursor.
Regards,
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]