Articles in this section
Category / Section

How to use custom font in WinRT RichTextBox control?

1 min read

In SfRichTextBoxAdv control, you can use any custom font to render text contents apart from the fonts installed in your machine.

 

Add the required font as a resource file in your project.

Adding required font as resource file

 

You can use the custom font by specifying the font name with its reference path and “#” as prefix.

 

The following code example demonstrates how to use custom font in SfRichTextBoxAdv control.

XAML

<RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" FontFamily="Assets/MyFont.ttf#MyFont" />

 

The following sample demonstrates how to use custom font in SfRichTextBoxAdv control.

WPF: Sample_WPF

UWP: Sample_UWP

WinRT: Sample_WinRT

 


Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied