New to Telerik UI for WinFormsStart a free 30-day trial

Fonts

Updated over 6 months ago

RadSyntaxEditor responds to changes in its font properties just as any other WinForms control. You can modify the font size and family of the control through the EditorFontSize and EditorFontFamily properties as demonstrated in Example 1.

Example 1: Setting font properties

C#

this.radSyntaxEditor1.SyntaxEditorElement.EditorFontSize = 18f;
this.radSyntaxEditor1.SyntaxEditorElement.EditorFontFamily = new Telerik.WinControls.SyntaxEditor.UI.FontFamily("TimesNewRoman");
         

These properties, however, will be applied to the line numbers, editor presenter and intelliprompt parts of the control.

WinForms RadSyntaxEditor Customizing the Font

Monospaced Font Optimization

When the used font is Consolas, Courier New or Lucida Console, you can benefit from the monospaced font optimization to boost the performance of the control. To enable this optimization, you need to set the UseMonospacedFontOptimization property to true for RadSyntaxEditorElement.

Example 2: Enabling monospaced font optimization

C#

this.radSyntaxEditor1.SyntaxEditorElement.UseMonospacedFontOptimization = true;         
In this article
Monospaced Font Optimization
Not finding the help you need?
Contact Support