laptop and a wrench

不具合

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
不具合 ID 番号 BUG-000176087
送信されましたApril 28, 2025
最終更新日June 26, 2025
適用対象ArcGIS Pro
見つかったバージョン3.4.2
オペレーティング システムWindows OS
オペレーティング システムのバージョン11.0 64 bit
ステータスAs Designed

参考情報

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

再現の手順

不具合 ID: BUG-000176087

ソフトウェア:

  • ArcGIS Pro

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動