Rajeev J Sebastian wrote:
On Friday 06 January 2006 16:43, Frank Meies wrote:
Rajeev J Sebastian wrote:
On Friday 06 January 2006 13:28, Frank Meies wrote:
3. does the error occur, when using only character clusters without any
diacritics/tone marks/etc. (i.e., only use the base character)?
I tested this again. It seems, there is no issue when all the characters
are only base characters (i.e., no ligatures or other CTL/OTF stuff).
Then, I simpy added a single ligature within this text, and immediately
the cursor problem became apparent.
ok, one more thing to check: In SwScriptInfo::ThaiJustify(), there is a
if statement, that should only be passed for base characters. Please
change the if statement so that it is not true for Malayalam non-base
characters check what happens.
I will check this though, I'm not very sure what I should do ... for e.g.,
one of the ligatures of Malayalam (unlike Thai) consists of the following:
ka + cd + ka ... of which ka is a base character, and cd is not a combining
mark.
In Malayalam, for proper typography, if there are component glyphs within the
cluster, then they too can be given a additional space, though this must be
smaller than the space given to clusters. This is probably problematic, so
let's not get into that here.
One more note: I suspect that the problem lies in the icu layout engine,
because even without using the thai justified alignment, the text looks
good on my windows machine, using the Arial Unicode font.
The issue is not of the beauty of the text, rather it is a problem of the
cursor movement. The problem is that the spaces between characters are not
computed properly (for some reason). For e.g.,
in one of the tests, I did the following:
ga + cd + la <space> sa
In this, ga+cd+la forms a ligature and is rendered as a single element; so we
have:
gla <space> sa
Now consider the cursor is just before the ligature gla. Pressing right arrow
key once, it should move to the left side of the space (right side of gla).
This happens properly, no problem.
Pressing it again, we expect the cursor to land on the left side of sa (right
side of space), but it does not: it lands on top of sa (in other experiments,
it lands either on the character i.e., <space> has greater than display
width, or just before the character i.e., <space> has smaller than display
width).
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?
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.
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.
Regards,
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]