Page 1 of 1
TRichViewEdit + Thai Language Support
Posted: Mon Feb 11, 2013 4:08 pm
by Graham
I have my RichViewEdit component set to wrap on ClientWidth. I import some Thai text. Now if I change the client width the text wraps according to the number of characters it can fit on the line. For Thai this can result is split words.
Can the RichViewEdit component be aware of Thai Word Breaks and wrap the text accordingly. There is a Uniscribe API "ScriptBreak" or the good old "FindThaiWordBreakW" which is in FTLX041E.DLL. I think either of these could solve the problem depending on how this edit component works.
Posted: Mon Feb 11, 2013 9:10 pm
by Sergey Tkachenko
Using Uniscribe is planned, but not for very near future.
I cannot find any information about FindThaiWordBreak function
Posted: Tue Feb 12, 2013 10:27 am
by Graham
I think the FTLX041E.DLL originated with XP and before Uniscribe was created. But I still use it on later operating systems. If you like I can send you the DLL and a quick example of how to use it. Basically you pass it a string of Thai characters and it will return the positions of the word boundaries.
I note your point about updating to Uniscribe. I have written an editor in the past and converted it to Uniscribe. Not for the faint hearted, but worth the effort.
Posted: Tue Feb 12, 2013 12:42 pm
by Sergey Tkachenko
About the Thai DLL. What is the string contains mixed language characters?
As for Uniscribe, as a first step we plan to use it for drawing and text measuring, not for line breaking and arranging items on a line.
Posted: Tue Feb 12, 2013 2:51 pm
by Graham
It would appear to work as you would expect/hope. The function returns an array of character positions where the spaces would be. So it returns the position of real spaces and the Thai Word Break positions. Non Thai characters appear to be ignored.