DefaultFont not working in SfRichTextEditor - Android

I cannot figure out how to pass a custom TTF file to use as the default font for all text in SfRichTextEditor. The TTF file already works in Xamarin Forms in various pages in my project, but SfRichTextEditor refuses to use it.

To reproduce this issue, I used this SF sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Font_Family-1369712876

I inserted the "DefaultFontFamily" XAML directive in MainPage.xaml as shown in the attached image, and nothing happens. This is using one of the fonts included with the sample and it still does not work!

syncfusion rich text editor font issue.jpg

Can anyone tell me the correct syntax for using these custom TTF fonts in SfRichTextEditor?

Thank you, it would be greatly appreciated, it seems I'm missing something simple. Might be worth adding an example of this to the documentation for SfRichTextEditor, which otherwise works very well! The documentation for SfRichTextEditor only states: 

"

NOTE

 - 

The DefaultFont property accepts fonts as Embedded source, System Font Name, or Base64 TTF string."


But it doesn't actually show you the syntax to use when specifying an embedded resource. I also tried system fonts and it didn't seem to work either.


3 Replies

GR Gayathri Ramalingam Syncfusion Team January 18, 2022 12:19 PM UTC

Hi Derek, 

Greeting from Syncfusion.  
 
We were able to reproduce the issue “DefaultFont not working in RichTextEditor with v18.1.0.36" in our side. And we have fixed this issue in our latest version is 19.4.0.43 and you can download it from nuget.org Please update your SfRichTextEditorControl to the mentioned version to resolve the issue. Please find the output screen shot from below, 
Result in 18.1.0.36 version 
Result in 19.4.0.43 version 
 
 
 
With Regards, 
Gayathri R 



DE Derek January 18, 2022 10:56 PM UTC

Thank you for the fast response!


May I also suggest updating the documentation to show exactly what the syntax is for XAML and C#? That was a real issue for me too, I had no "benchmark" syntax to compare against.



GR Gayathri Ramalingam Syncfusion Team January 19, 2022 12:37 PM UTC

Hi Derek, 
 
Thank you for your update. We will update the information in our UG documentation and let you know once completed.   
 
With Regards, 
Gayathri R 


Loader.
Up arrow icon