The RTF formatted string may be a RTF-Header plus a plain or formatted text.
To get a RTF-Header, you can save a quodlibet file in RTF format from WordPad and peek inside, say, with Notepad.
To give you some examples:
A RTF-Header could be:
Code: Select all
re_head.s="{\rtf1\ansi\deff0{\fonttbl"
re_head + "{\f0\froman\fprq1\fcharset0 Times New Roman;}}"
re_head + "{\colortbl ;\red32\green64\blue128; \red0\green127\blue255;}};
re_head + "\li80\ri80\fi400\qj\sb90\fs32\fc0 "
Where:
\li, \ri, \fi -> indents (left, right, first line)
\sb -> paragraph spacing
\fs -> font size (2x the values we may be used to)
\fc -> font color index, according to the specified table
\qj, \ql, \qc, \qr -> alignment
(etc.)
You can concatenate keywords without spaces; when text follows, add a space (es. '\ri300\li300 Hi there.\par ').
In text formatting:
\b .. \b0 is for bold, \i .. \i0 for italics, \par and \line etc.
I learnt from WordPad's output but it's easy to find the syntax around.