I need a Borland Delphi non-visual component that can generate RTF text for display. The logic behind the idea is that I will pass multiple text string fragments to the component and set the font properties for that fragment of text. Procedure AddText(Str: String; Font: TFont); The font name, size, color, style, etc will be extracted from the TFont. If Str includes a CR/LF it needs to be converted to the proper RTF code for a new line. Once all the text has been added I would like to be able to access the resulting RTF as a TStream Procedure AsRTF(var Stream: TStream); I sort of understand the RTF format and I know you will need to generate a font and color table to keep track of which fonts and colors are used. This table should be kept seperate from the raw RTF code and only inserted into the AsRTF Stream result. AsRTF should also add any remaining close brackets that may be required.
The component must be able to handle 8-bit characters and properly display text using the Terminal font. (I have had many problems with this)
UPDATE: 8/25/04 -- 1:27PM PST
I am taking ANSI terminal text and converting it into RTF.
The output RTF will use the Terminal font.
I've done the ANSI conversion, I just need to plugin a RTF writer.
Some of the text contains high-ascii characters, these characters need to display correctly when viewed.
Below is a sample
<[login to view URL]>
<[login to view URL]>
## Deliverables
A complete and working non-component to convert text + font into RTF code that can be directly loaded into a richedit or saved to a file.
This component must not use any external components (i.e. TRichEdit) or OLE automation to generate the RTF.
The component must be able to handle 8-bit characters and properly display text using the Terminal font. (I have had many problems with this)
## Platform
Windows, Richedit v1.0 compatible, Borland Delphi