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-Nummer BUG-000176087
EingereichtApril 28, 2025
Zuletzt geändertJune 26, 2025
Gilt fürArcGIS Pro
Gefunden in Version3.4.2
BetriebssystemWindows OS
Betriebssystemversion11.0 64 bit
StatusAs Designed

Zusätzliche Informationen

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} ]

Schritte zur Reproduzierung

Bug-ID: BUG-000176087

Software:

  • ArcGIS Pro

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln