laptop and a wrench

Bug

When updating the font name and style of an annotation feature class with an annotation cursor and CIM in ArcGIS Pro, in some cases it will update the map annotation style but not the associated fields in the annotation attribute table.

ArcGIS Pro
Bug ID Number BUG-000176087
SubmittedApril 28, 2025
Last ModifiedJune 26, 2025
Applies toArcGIS Pro
Version found3.4.2
Operating SystemWindows OS
Operating System Version11.0 64 bit
StatusAs Designed

Additional Information

The fontFamilyName and fontStyleName CIM properties do not always match the ArcGIS Pro user interface due to the way ArcGIS Pro organizes font styles by common font family in the UI. When setting the fontFamilyName and fontStyleName properties programmatically, it's important to first confirm how the desired font and style are defined in the CIM. One way to do this is to configure a layer's label class to use the desired font and save the layer to a layer file (.lyrx extension). Then open the layer file in a text editor and search for the font name and examine how the font information is defined in the CIM. In addition to fontFamilyName and fontStyleName, variable fonts also require the fontVariationSettings property to be defined. https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm Sitka Small Bold is an example of a variable font that is represented differently in the ArcGIS Pro UI vs the CIM definition. ArcGIS Pro lists this font with Font Name = "Sitka" and Font Style = "Small Bold", along with 2 variable font settings: OpticalSize=6 and Weight=700. Here is how this looks in the CIM definition:

"fontFamilyName" : "Sitka Text",
"fontStyleName" : "Regular",
"fontType" : "TTOpenType",
"fontVariationSettings" : [
  {
    "type" : "CIMFontVariation",
    "tagName" : "opsz",
    "value" : 6
  },
  {
    "type" : "CIMFontVariation",
    "tagName" : "wght",
    "value" : 700
  }
]

With this information, a script that sets this font style should use "Sitka Text" as the fontFamilyName, "Regular" as the fontStyleName, and include the fontVariationSettings information. Python example:

myTextSymbol.fontFamilyName = Sitka Text"
myTextSymbol.fontStyleName = "Regular"
myTextSymbol.fontVariationSettings = [ {"tagName" : "opsz", "value" : 6}, {"tagName" : "wght", "value" : 700} ]

Steps to Reproduce

Bug ID: BUG-000176087

Software:

  • ArcGIS Pro

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options