laptop and a wrench

Erro

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
Número de ID do Erro BUG-000176087
EnviadoApril 28, 2025
Última ModificaçãoJune 26, 2025
Aplica-se àArcGIS Pro
Versão encontrada3.4.2
Sistema OperacionalWindows OS
Versão do Sistema Operacional11.0 64 bit
StatusAs Designed

Informações Adicionais

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

Etapas para Reproduzir

ID do Erro: BUG-000176087

Software:

  • ArcGIS Pro

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download