TRichViewEdit + Thai Language Support

General TRichView support forum. Please post your questions here
Post Reply
Graham
Posts: 64
Joined: Sun Jan 27, 2013 7:51 pm
Location: Berkshire U.K.

TRichViewEdit + Thai Language Support

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Using Uniscribe is planned, but not for very near future.
I cannot find any information about FindThaiWordBreak function :(
Graham
Posts: 64
Joined: Sun Jan 27, 2013 7:51 pm
Location: Berkshire U.K.

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Graham
Posts: 64
Joined: Sun Jan 27, 2013 7:51 pm
Location: Berkshire U.K.

Post 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.
Post Reply