Ticket T403003
Visible to All Users

XRRichText and character spacing

created 9 years ago

Hi,

we have an application that includes several XtraReports.

Inside those reports there is a XRRichtText control bound to a property that contains html.
The html uses letter-spacing and line-height but it seems that those values are ignored by the XRRichText control.

We also tried to use text formatted in rtf to meet the requirements, but this also did not work. The text was shown as if we did not change the character spacing.

How can we make the XRRichtText control take the different character spacing into account?

Comments (2)
Vasily (DevExpress Support) 9 years ago

    Hi Oliver,

    Would you please send us the HTML code that you are trying to render by using the XRRichText control? We are look forward to hearing from you.

      Hi Vasily,

      I created a simplified version of the the HTML code we are trying to render.
      The different letter-spacing and line-height are applied to the second parapragh.

      While testing this code i noticed that the XRRichText control does indeed render the line-height correctly. It seems that our "big" HTML code has some other problems i need to fix.

      However, the letter-spacing is not taken into account.

      HTML
      <p style="font-family: Tahoma, sans-serif; text-align: center;"> <b><span style="color: #C1334B">colored and bold</span></b> &middot; some text &middot; more text here &middot; <span style="color: #C1334B">more colored text</span> text text <br /> <b><span style="color: #C1334B">colored and bold</span></b> &middot; some text &middot; more text here &middot; <span style="color: #C1334B">more colored text</span> text text </p> <p style="font-family: Tahoma, sans-serif; text-align: center; letter-spacing: 6px; line-height: 1.8; "> <b><span style="color: #C1334B">colored and bold</span></b> &middot; some text &middot; more text here &middot; <span style="color: #C1334B">more colored text</span> text text <br /> <b><span style="color: #C1334B">colored and bold</span></b> &middot; some text &middot; more text here &middot; <span style="color: #C1334B">more colored text</span> text text </p>

      Answers approved by DevExpress Support

      created 9 years ago (modified 9 years ago)

      Hi Oliver,

      Thank you for sending us your code. This issue is caused by the fact that currently, XRRichText control does not support character spacing. So, the letter-spacing attribute is being ignored when you are loading this HTML content to the  XRRichText control.
      In any case, the line-height attribute is working without any issue on my side. I have created a sample project and recorded a video to illustrate this. You can find this sample project and video in the attachment.

        Comments (2)

          Hi Vasily,

          Thank you for your video and the information that character spacing is not supported.

          Vasily (DevExpress Support) 9 years ago

            You are always welcome, Oliver!
            Please do not hesitate to contact us in case of any difficulty. We will be happy to help you resolve any problem.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.