ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SymbolFactory Class / DefaultFont Property
Example

In This Topic
    DefaultFont Property (SymbolFactory)
    In This Topic
    Gets the application default font family name and style. This property must be accessed on the MCT. Use QueuedTask.Run.
    Syntax
    public ValueTuple<string,string> DefaultFont {get;}
    Public ReadOnly Property DefaultFont As ValueTuple(Of String,String)
    Example
    Get/Set Default Font
    //Must use QueuedTask.Run(...)
    var def_font = SymbolFactory.Instance.DefaultFont;
    System.Diagnostics.Debug.WriteLine($"{def_font.fontName}, styles: {def_font.styleName}");
    
    //set default font - set through application options
    //Must use QueuedTask
    ApplicationOptions.TextAndGraphicsElementsOptions.SetDefaultFont("tahoma");
    ApplicationOptions.TextAndGraphicsElementsOptions.SetDefaultFont("tahoma","bold");
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also