Hello Sergey,
applying a style to a r2l language (hebrew), causes rearranging of words.
I send by email a sample rvf file. Try to select 2nd or 3rd word and apply any style (e.g. bold) with RVActionTest.
Have i overlooked something?
Thanks
Costas
Words rearranged when applying style to rl2 text
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Unfortunately, TRichView bidi text arrangement algorithm is not perfect, so in some cases the user needs to help the editor to get the correct result.
When drawing a single text item, TRichView relies on Window text rendering, so it is always displayed correctly.
But when the line consists of several items (like after making a word bold), items are arranged by TRichView according to BiDiMode settings and properties of outermost characters.
In your document:
RichViewEdit.BiDiMode = unspecified
paragraph's BiDiMode = unspecified
text's BiDiMode = LTR
These settings are not correct for bidi text. While the proper bidi processing is done on text level, bidi processing for paragraphs is turned off (because unspecified BiDiMode), so items are always arranged LTR on the line.
Set RichViewEdit's BiDiMode to LTR or, preferably, to RTL.
When drawing a single text item, TRichView relies on Window text rendering, so it is always displayed correctly.
But when the line consists of several items (like after making a word bold), items are arranged by TRichView according to BiDiMode settings and properties of outermost characters.
In your document:
RichViewEdit.BiDiMode = unspecified
paragraph's BiDiMode = unspecified
text's BiDiMode = LTR
These settings are not correct for bidi text. While the proper bidi processing is done on text level, bidi processing for paragraphs is turned off (because unspecified BiDiMode), so items are always arranged LTR on the line.
Set RichViewEdit's BiDiMode to LTR or, preferably, to RTL.