Page 1 of 1

RTF Specification bug?

Posted: Fri Dec 09, 2005 12:12 pm
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

Posted: Sun Dec 11, 2005 8:06 pm
by Sergey Tkachenko
"At least" and "Exactly" kinds of line spacing are not supported by TRichView yet.

Posted: Mon Dec 12, 2005 9:30 am
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.

Posted: Mon Dec 12, 2005 3:07 pm
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.