RTF Specification bug?

General TRichView support forum. Please post your questions here
Post Reply
looseleaf
Posts: 2
Joined: Fri Dec 09, 2005 11:01 am

RTF Specification bug?

Post by looseleaf »

Greetings!

We have troubles with getting line spacing to work properly with RichView.

The starting point is an RTF created by a TRxRichEdit component seomwhere else. This RTF code contains line spacing information which is lost when importing the RTF into our RichView or RichViewEdit.

The problem seems to be this sequence:

\sl400\slmult0

The specification I found at [0] says that if \slmultN with N=0 the "exact" or "at least the" line spacing that was defined in the \sl command before shall be used. If I manually change the \slmult0 to \slmult1, RichView works properly.

This is with 1.9.8 and Delphi 5. Wordpad loads the RTF file properly.

Stefan
[0] http://www.biblioscape.com/rtf15_spec.htm
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

"At least" and "Exactly" kinds of line spacing are not supported by TRichView yet.
looseleaf
Posts: 2
Joined: Fri Dec 09, 2005 11:01 am

Post by looseleaf »

Sergey Tkachenko wrote:"At least" and "Exactly" kinds of line spacing are not supported by TRichView yet.
I see, nonetheless, it seems to work, if we manually replace the \slmult0 with \slmult1. But, as my boss just told me for he tried it, one line too late.

We'll experiment a bit.
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

\smult1 mode is supported. In this mode, \sl specifies a line spacing multiplier, and \slN means that line spacing is N/240*(single line spacing).
Info about N/240 is not included in that RTF specification, but it's true.

In \smult0 mode, \sl means a completely different thing - a distance (measured in twips or in points, not sure - another omission in RTF specification) between text base lines. This type of line spacing is not implemented in TRichView yet.
Post Reply