english and arabic text in the document

General TRichView support forum. Please post your questions here
Post Reply
sr1111
Posts: 27
Joined: Thu Jan 31, 2008 12:18 pm

english and arabic text in the document

Post by sr1111 »

I have (english and arabic text) in the one richedit
how can I change font in the richviewedit all arabic and english text

I want to
arabic text only= arial,
english text only=times new roman


I can make this but all text arial
RichViewEdit.SelectAll;
RichViewEdit.Style.TextStyles[0].FontName:= 'Arial';
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry for the delay.
TRichView does not have standard functions to apply different formatting to English and Arabic characters.
So the only way is to select character by character and apply font to them depending on the character class (of course, it can be optimizing by selecting the whole fragment containing only English or only Arabic characters).
But what to do with characters that are not Arabic and not English? Spaces or punctuation, for example?
Post Reply