On Fri, 07 Dec 2012 03:25:14 +0000 Martin <[email protected]> wrote:
> On 07/12/2012 02:38, Mattias Gaertner wrote: > > On Thu, 06 Dec 2012 22:53:12 +0000 > > Martin <[email protected]> wrote: > >> [...] > >> I need feedback from people who actually speak (or at least read and > >> write) Arabic. I need to know, if the above situation is "useable". > > Attached is a small example text and a screenshot showing, how Firefox > > with font "serif"renders it, how synedit with "Courier New" renders it > > and how synedit with "monospace" renders it. > > > > Firefox and the "monospace" synedit shows only one > > ligature (??), combined of the two codepoints alif ? and lam ?. > > Firefox allows to select the two independently. > > > > The "courier new" font shows another ligature: > > The ??? are three letters in "monospace", while with "courier new" it > > shows the two rightmost combined as one. > > > > Was the synedit picture taken with extra char spacing? Because without > that, you get the wrong behaviour (select line, char by char) It was taken under Linux/gtk2 with ExtraCharSpace=0. Setting ExtraCharSpace to 1 shows the characters separated. > I know how it should be shown ideally. Then you are ahead of most scientists. ;) > The question is how far away from ideal would still be useful? And that > I can not tell for a script, that I do not use at all. > Someone once said, some editors display the ligatures, as 2 chars. And > that would be accepted by many people. But I can not judge that. The ligatures are not important at the beginning. Later at least the alif+lam ligature is needed. It is crucial that the connected characters are shown connected. > The proper ligature handling is a lot more work. And it depends on the > font (or it may at least) On windows there is an API, that would allow > to get that info. However if not carefully done, it may have effect on > the speed of synedit (quite possible noticeable). > On others, I wouldn't even know where to look for such an API. But > little point, until SynEdit is ready to use an external API in this > place. (That is it does not call it excessively) Maybe it can be done by a plugin? Then the LCL+synedit do not need to implement it fully, but users can implement the subset they need. > As for placing the caret in the middle of a char, that would require 90% > of the work to render proportional fonts (on the list, but not now) IMO the placing in the middle is somewhat strange. Perhaps showing a special caret or icon is doable. That has low priority. > Below is with extra char spacing, and you can see a stretched bit of > horizontal line I see a long connection between the second and third from the left (the alif and the jim). And I see the alif-lam ligature. See the attachment. > Without the etra char spacing, there is a gap, between the RTL and the > LTR spaces atthe end (use visible spaces, r type real latin text at the > end). > Delete half the ligature, and it will go away, causing the LTR text to > move, even so the RTL has still the same length (ligature replaced by > remaining normal char) > > So at the moment for synEdit the ligature are 2 chars, they must take to > cells on screen. > > The point is. It might be some time until I can add proper ligature > handling. > But I can try to get the current behaviour without the extra char > spacing (if that current behaviour is of any use). > It might be possible to force the splitting of the ligature, I do not > know that for sure. Also GTK2 will probably split it, others I do not > know. (GTK2, will have to pain every char on its own.) Mattias
<<attachment: arabic2.png>>
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
