On 14/12/2012 21:15, patspiper wrote:
On 14/12/12 21:33, Martin wrote:
On 13/12/2012 14:39, Martin wrote:

Ok, bad news, I did some more testing myself, and it turns out, that WIndows allocates the extra space (song connection line) just anywhere in the word, or at the end of it, but not always where the ligation is.

.....
So what's next.
The only way to support this, is to make SynEdit aware of the ligatures. And that is a lot of work, so it will take more time. And I don't yet know when I will schedule it....

Ok, I found a quick way to get a use-able behaviour.
:)

*  it is currently WINDOWS ONLY
:(

For GTK, I believe this 
functionhttp://developer.gnome.org/pango/stable/pango-Text-Processing.html#pango-get-log-attrs
   can deliver the information needed.
But in addition there may be a need for further fixes/improvements in 
ExtTextOut (widgetset)

Other WidgetSets: No idea

If anyone wants to give GTK a try, I will mail what needs to be done.


- ligatures are handled as follows.
   There is  no middle caret
Depending on the caret being before or after (and accordingly backspace or delete being used) the first or 2nd char is deleted # So it is 2 chars, but any caret move will just be translated into skipping the middle pos

When you mention ligatures, do you mean any 2 connected characters (ex: ???), or characters that combine such as Lam Alef (??)?
Lam Alef

combining codepoints (such as dots or accents added to chars) are handled diferrently (SynEdit knows them for Arabic Only):
- Backspace (from behind the char), deletes one codepoint
- Delete (from before the char) deletes char + all combining (leaving the dot without the char makes little sense?)

combining codepoints not known to synedit (none arabic), will act like ligatures.


I tested the behaviour of Libre Office Writer (Ubuntu):

- Damma or shadda or similar will combine with the affected character and form one character as far as the cursor movement is concerned. Backspace after the combined character will remove the damma. Delete before the character will remove both.
See above

- Lam Alef produced by pressing a single keyboard key (?) acts as a single character in all aspects.

- Lam followed by Alef will combine visually into one character (??) but acts as 2 characters in all aspects.

I can not test (I don't know haw to write Arabic, except for hitting random keys on an Arabic layout). If the single keystroke, produces a single utf8 char, then yes.

SynEdit works on Utf8 Codepoints. Except where it finds combining Codepoints, if they are in the list of combining, that SynEdit includes.

----------
On addition, it asks Windows, if any sequence of codepoints is drawn as a single glyph. This is used to calculate the position of the caret, in relation to each glyph, as well as the length of the line, and where to apply highlights.


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to