TextEntity.RichText do not seem to support new line from RichTextBox

I am running into problems when trying to add new line using RichTextBox but not with Plane text. I have tested it in Rhino 7 (SR37) and Rhino 8 (SR17)

            TextEntity text = new TextEntity();
            RichTextBox rtb = new RichTextBox();
           
            rtb.AppendText("Word\nWord\nWord\nWord");
            text.RichText = rtb.Rtf;  // All becomes one line without new line

            text.PlainText = "Word\nWord\nWord\nWord"; // Works correctly

I have tried Environment.NewLine and \r\n and \r

Rich Text has a different set of rules. I believe \par is the proper way to do a new line but I could be wrong. For example rtb.Rtf = @"{\rtf1\ansi Word\par word}"; should do the trick.

if i use this:

TextEntity text;
text.RichText = @"{\rtf1\ansi Word\par word}";

results on screen is WordWord.

rtb = new RichTextBox();
rtb.AppendText("Word\nWord");
string s = rtb.Rtf;

If I Print rtb.Rtf then i will see: "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Microsoft Sans Serif;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs17 Word\\par\r\nWord\\par\r\n}\r\n"

Result on a screen will be still WordWord.

if you set the rich text on the RichTextBox like my example it should multiline.

rtb = new RichTextBox();
rtb.Rtf = @"{\rtf1\ansi Word\par word}";

You might want to do some googling on the rich text format for more detailed info on the format specifics.

It seems still that is TextEntry problem not RichTextBox one

            RichTextBox rtb = new RichTextBox();
            rtb.Rtf = @"{\rtf1\ansi Word\par word}";
            TextEntity text = new TextEntity();
            text.RichText = rtb.Rtf;
            text.Plane = new Plane(new Point3d(0, 0, 0),  new Vector3d(0, 0, 1));

            doc.Objects.AddText(text); // One line

            Form form = new Form
            {
                Text = "RichTextBox",
                Width = 400,
                Height = 300
            };
            form.Controls.Add(rtb);  // Two line
            form.ShowDialog();

result:

replaceing rtb.Rtf = @"{\rtf1\ansi Word\par word}"; with rtb.AppendText("Word\nWord"); gives exaclty same result.