We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfRichTetBoxAdv doesn't use default font...

Thread ID:

Created:

Updated:

Platform:

Replies:

147431 Sep 10,2019 02:57 PM UTC Sep 11,2019 06:35 AM UTC WPF 1
loading
Tags: SfRichTextBoxAdv
Heinz-Josef Bomanns
Asked On September 10, 2019 02:57 PM UTC

Hi there,

in code-behind i set the font of a SfRichTetBoxAdv to for eg. Verdana 14pt:

rtb.FontFamily = New Media.FontFamily("Verdana")
rtb.FontSize = 14

The user enters some text that is displayed correctly in Verdana 14pt. The content is retrieved like this:
Dim rtfText As String = ""
Dim ms As Stream = New MemoryStream()
rtb.Save(ms, RichTextBoxAdv.FormatType.Rtf)
ms.Position = 0
Dim byts As Byte() = New Byte(ms.Length - 1) {}
ms.Read(byts, 0, byts.Length)
rtfText = System.Text.Encoding.GetEncoding("UTF-8").GetString(byts, 0, byts.Length)
Return rtfText
The rtfText is then saved for later use. Lateron the text is loaded into the SfRichTetBoxAdv like this:

    arrBytes = Encoding.GetEncoding("UTF-8").GetBytes(rtfText)
    ms = New MemoryStream(arrBytes)
    rtb.Load(ms, RichTextBoxAdv.FormatType.Rtf)

After that the text is always 'Times New Roman' in 12pt. Any ideas what's going wrong here? Thanks...


Premkumar Sundaramoorthy [Syncfusion]
Replied On September 11, 2019 06:35 AM UTC

Hi Heinz-Josef, 
  
  
We have already fixed this issue Font family and font size of the text is changed while export as rtf file. And included the fix in our latest weekly release version 17.2.0.51 which is delivered on September 10th, 2019. Kindly use our latest version and check whether the issue is resolved. 
  
Regards, 
Premkumar  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon