trichviewedit & Srichviewedit save as rtf
trichviewedit & Srichviewedit save as rtf
when I save as rtf and open the rtf with Microsoft's wordpad
, in the front of document will appear the Fonts name
Just some Fonts will appear it like Chinese Fonts
but some Fonts like Arial will not appear in the head of document
, in the front of document will appear the Fonts name
Just some Fonts will appear it like Chinese Fonts
but some Fonts like Arial will not appear in the head of document
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I am afraid it cannot be fixed.
The problem with Wordpad/RichEdit: it does not expect Unicode characters in the RTF font table, so it just inserts them in a normal text.
A similar problem was for Unicode characters in document properties (like author, title, comments). I added a workaround using \upr\ud keywords.
I tried to make the same workaround in RTF font table. Wordpad reads it correctly (ignores Unicode but takes ANSI characters from the font names). But now the problem is in MS Word! It does not expect \upr\ud keywords in RTF font table...
By the way, I tried to resave your test_rtf1.rtf in MS Word, and it cannot save this RTF correctly! It saves '??' as a font name (at least, in non-Chinese version of Windows).
So I leave TRichView code unchanged, because I cannot see a solution.
The problem with Wordpad/RichEdit: it does not expect Unicode characters in the RTF font table, so it just inserts them in a normal text.
A similar problem was for Unicode characters in document properties (like author, title, comments). I added a workaround using \upr\ud keywords.
I tried to make the same workaround in RTF font table. Wordpad reads it correctly (ignores Unicode but takes ANSI characters from the font names). But now the problem is in MS Word! It does not expect \upr\ud keywords in RTF font table...
By the way, I tried to resave your test_rtf1.rtf in MS Word, and it cannot save this RTF correctly! It saves '??' as a font name (at least, in non-Chinese version of Windows).
So I leave TRichView code unchanged, because I cannot see a solution.
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Well, ok.
I'll add a compiler define RVRTFNOUNICODEFONTNAMES. You can activate it in RV_Defs.inc or in the options of your project.
If activated, TRichView will convert font names from Unicode before saving them to RTF. This conversion may lose information (for example, on my computer, this font name is converted to '??'), but it makes Wordpad/RichEdit happy.
I'll add a compiler define RVRTFNOUNICODEFONTNAMES. You can activate it in RV_Defs.inc or in the options of your project.
If activated, TRichView will convert font names from Unicode before saving them to RTF. This conversion may lose information (for example, on my computer, this font name is converted to '??'), but it makes Wordpad/RichEdit happy.
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: