Using the evaluation trial (TRichViewEdit v23.1) under Delphi 12.3. Sorry for the long post.
The bullet I use is from the Symbol set, character B7.
Checkboxes and radio buttons use Wingdings:
CmtChkBox_Empty = 168; // 0xA8
CmtChkBox_Check = 254; // 0xFE
CmtRadioBtn_Empty = 161; // 0xA1
CmtRadioBtn_Check = 164; // 0xA4
RTFOption.rvrtfDuplicateUnicode is False.
See "SymbolSet.rtf" for sample RTF that I load using your Editor 1 demo, RVEditDemo_Skia, at:
C:\Components\TRichViewTrialDelphiFMX_D12\TRichView\Demos\Delphi.FMX\Editors\Editor 1
When RTFReadProperties.ConvertSymbolFonts is False, bullets, checkboxes, radio buttons show up fine on Windows. On Android, bullets show up fine, though tiny, but not checkboxes and radio buttons. See "SymbolSet Windows.jpg" and "SymbolSet Android.jpg".
When RTFReadProperties.ConvertSymbolFonts is True, checkboxes, radio buttons show up fine on Windows, but not bullets (double char kind of thing). On Android, bullets come out like they do on Windows (double char thing). Checkboxes and radio buttons are better but not good. Unchecked radio button looks good, but not the checked version. For checkboxes, checked and unchecked are both checked. See "SymbolSet Win Convert.jpg" and "SymbolSet Android Convert.jpg".
I even tried deploying Wingdings as both wingding.ttf and Wingdings.ttf to ".\assets\internal" for the Android build, but not sure if I even came close to doing that right.
My main concern is the bullets when ConvertSymbolFonts is True for Android and iOS (my app is only for mobile). For checkboxes and radio buttons I'm thinking/hoping maybe I can find alternative chars that convert better if I can't get my current Wingding chars to work.
Any help or insight is most welcome! Thanks!
Eric
ConvertSymbolFonts and bullets
-
- Posts: 20
- Joined: Sun May 25, 2025 6:41 pm
ConvertSymbolFonts and bullets
- Attachments
-
- SymbolsSet Android Convert.jpg (54.16 KiB) Viewed 6211 times
-
- SymbolsSet Android.jpg (51.43 KiB) Viewed 6211 times
-
- SymbolsSet Windows.jpg (8.44 KiB) Viewed 6211 times
-
- SymbolsSet Win Convert.jpg (8.86 KiB) Viewed 6211 times
-
- SymbolSet.rtf
- (3.26 KiB) Downloaded 45 times
-
- Posts: 20
- Joined: Sun May 25, 2025 6:41 pm
Re: ConvertSymbolFonts and bullets
I found an issue with the RTF, which is generated by WPTools for the most part. However, not sure why it is not a problem when ConvertSymbolFonts is false but is when true.
In the SymbolSet.rtf, there is this line:
{\list\listtemplateid2\listsimple{\listlevel\leveljc0\levelfollow0\levelstartat1\levelindent360\levelnfc23\levelstartat1{\leveltext\'02·\'00;}{\levelnumbers \'02;}\f4}\listid2}
If I change the two '02 to '01 (or even just the first one), the bullets come out fine when using ConvertSymbolFonts:
{\list\listtemplateid2\listsimple{\listlevel\leveljc0\levelfollow0\levelstartat1\levelindent360\levelnfc23\levelstartat1{\leveltext\'01·\'00;}{\levelnumbers \'01;}\f4}\listid2}
It shouldn't be '02 since a bullet is one char. I'm no expert on RTF by a long shot, but am I wrong? If I'm not wrong, it seems like a bug in WPTools RTF export that I can probably fix, but again, why is it OK when not using ConvertSymbolFonts?
Eric
In the SymbolSet.rtf, there is this line:
{\list\listtemplateid2\listsimple{\listlevel\leveljc0\levelfollow0\levelstartat1\levelindent360\levelnfc23\levelstartat1{\leveltext\'02·\'00;}{\levelnumbers \'02;}\f4}\listid2}
If I change the two '02 to '01 (or even just the first one), the bullets come out fine when using ConvertSymbolFonts:
{\list\listtemplateid2\listsimple{\listlevel\leveljc0\levelfollow0\levelstartat1\levelindent360\levelnfc23\levelstartat1{\leveltext\'01·\'00;}{\levelnumbers \'01;}\f4}\listid2}
It shouldn't be '02 since a bullet is one char. I'm no expert on RTF by a long shot, but am I wrong? If I'm not wrong, it seems like a bug in WPTools RTF export that I can probably fix, but again, why is it OK when not using ConvertSymbolFonts?
Eric
-
- Site Admin
- Posts: 17852
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: ConvertSymbolFonts and bullets
\leveltext\'02·\'00 defines a two-character string. The first character is '·', the second character is a placeholder for the list counter.
However, for this list, \levelnfc23 is set, that means "Bullet" (no list counter).
While this is bug of this RTF, I'll change RTF reading code to remove list counter placeholders for bullers.
However, for this list, \levelnfc23 is set, that means "Bullet" (no list counter).
While this is bug of this RTF, I'll change RTF reading code to remove list counter placeholders for bullers.