RTL text support, selection
RTL text support, selection
About RTL text support.
I copy-pasted a simple Arabic string, mixed with English text. Here it is:
1999 النظم العربية المتطورة. جميعCopyright © 1999 Some text الحقوق محفوظة
Now try to select this string from left to right. The result in incorrect: some Arabic chars are drawn incorrectly (when selected).
I tried on compiled demo of RVEdit.
I copy-pasted a simple Arabic string, mixed with English text. Here it is:
1999 النظم العربية المتطورة. جميعCopyright © 1999 Some text الحقوق محفوظة
Now try to select this string from left to right. The result in incorrect: some Arabic chars are drawn incorrectly (when selected).
I tried on compiled demo of RVEdit.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
No, I understand you. I just said that this demo was compiled without support of bidirected text.
I compiled actiontest demo with support of bidi text: http://www.trichview.com/support/files/ ... stbidi.zip
I set RichViewEdit1.BiDiMode = rvbdLeftToRight, and added text and paragraph direction actions in Font and Paragraph menu.
I compiled actiontest demo with support of bidi text: http://www.trichview.com/support/files/ ... stbidi.zip
I set RichViewEdit1.BiDiMode = rvbdLeftToRight, and added text and paragraph direction actions in Font and Paragraph menu.
1 Sorry, cannot paste the Unicode string (Edit - Paste Special - Unicode text) into this demo.
2 When opening "rvedit\Demo\Readme.rvf" with this demo I get:
2 When opening "rvedit\Demo\Readme.rvf" with this demo I get:
Code: Select all
---------------------------
Error
---------------------------
Error loading file.
Possible reasons:
- format of this file is not supported by this application;
- the file is corrupted;
- the file is opened and locked by another application.
---------------------------
ÎÊ
---------------------------
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
This file does not contain enough information to be loaded in this demo.
It was saved without text and paragraph styles, so it can be opened only in application having the same collections of styles what was used when creating this file. Resaving this file in the Editor1 demo will help (this demo has dialog for RVF file saving options; options for saving styles are tuned on by default).
But be careful when loading RVF files containing "layout" information, because "layout" includes BiDiMode. If RVF file with BiDiMode=rvbdUnspecified will be loaded, RTL text will not be processed properly.
It was saved without text and paragraph styles, so it can be opened only in application having the same collections of styles what was used when creating this file. Resaving this file in the Editor1 demo will help (this demo has dialog for RVF file saving options; options for saving styles are tuned on by default).
But be careful when loading RVF files containing "layout" information, because "layout" includes BiDiMode. If RVF file with BiDiMode=rvbdUnspecified will be loaded, RTL text will not be processed properly.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
About pasting. That demo does not use Unicode, so pasted Unicode text will be converted to ANSI.
Well, this is one more demo: http://www.trichview.com/support/files/ ... di_uni.zip
It has both bidi and Unicode support turned on.
In addition, I added a combobox on toolbar allowing to switch RichViewEdit1.BiDiMode (default text direction for the whole document).
When opening/pasting text and RTF files, all text will still be Unicode in this demo. ANSI text fragments may appear only after opening/pasting RVF files.
As you can see, Unicode+BiDi works slightly worse than ANSI+BiDi. While it is ok when using some fonts (such as "Arial Unicode MS"), for some fonts selection is not displayed correctly.
Well, this is one more demo: http://www.trichview.com/support/files/ ... di_uni.zip
It has both bidi and Unicode support turned on.
In addition, I added a combobox on toolbar allowing to switch RichViewEdit1.BiDiMode (default text direction for the whole document).
When opening/pasting text and RTF files, all text will still be Unicode in this demo. ANSI text fragments may appear only after opening/pasting RVF files.
As you can see, Unicode+BiDi works slightly worse than ANSI+BiDi. While it is ok when using some fonts (such as "Arial Unicode MS"), for some fonts selection is not displayed correctly.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
TRichViewEdit can work either with 1-byte (ANSI) or 2-byte (Unicode) text internally (or with mix of ANSI and Unicode text).
Even with ANSI text, you can create TRichView documents containing several languages, by specifying the proper Charset for text fragments. But you need to do it manually in the most cases.
actiontestbidi.zip was compiled to work with ANSI internally.
actiontest_bidi_uni.zip was compiled to work with Unicode internally (see http://www.trichview.com/forums/viewtopic.php?t=70 )
Even with ANSI text, you can create TRichView documents containing several languages, by specifying the proper Charset for text fragments. But you need to do it manually in the most cases.
actiontestbidi.zip was compiled to work with ANSI internally.
actiontest_bidi_uni.zip was compiled to work with Unicode internally (see http://www.trichview.com/forums/viewtopic.php?t=70 )