ArcGIS Pro 2.9 API Reference Guide
SetDefaultFont(String,String) Method

ArcGIS.Desktop.Core Namespace > TextAndGraphicsElementsOptions Class > SetDefaultFont Method : SetDefaultFont(String,String) Method
The font family to set as the default
The default style to use in the font family
Sets the application default font family name and style. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void SetDefaultFont( 
   string familyName,
   string styleName
)
Public Overloads Sub SetDefaultFont( _
   ByVal familyName As String, _
   ByVal styleName As String _
) 

Parameters

familyName
The font family to set as the default
styleName
The default style to use in the font family
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
font not found
Remarks
If the input font family name does not exist an System.ArgumentException will be thrown. If the provided style is not found in the input font family the style will default to default font style for the given font family.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

TextAndGraphicsElementsOptions Class
TextAndGraphicsElementsOptions Members
Overload List