Font: StyleWithOpacity & {
    color?: "default" | "inherit" | "swimlane" | string;
    family?: string;
    isBold?: boolean;
    isItalic?: boolean;
    isStrikeThrough?: boolean;
    isUnderline?: boolean;
    size?: number;
}

Note about properties that can be reset to default values.

Except for color (when the "BPMN in Color" support is disabled), all style properties can be set in the BPMN diagram via LabelStyle and can then override the default values. Currently, there is no way to know if they are overridden. So it is not possible to reset each property with the "Update Style" API.

Type declaration

  • Optional color?: "default" | "inherit" | "swimlane" | string

    Possible values are all HTML color names or HEX codes, as well as special keywords such as:

    • default to use the color defined in the BPMN element default style.
    • inherit to apply the font color of the direct parent element.
    • swimlane to apply the font color of the nearest parent element with the type ShapeBpmnElementKind.LANE or ShapeBpmnElementKind.POOL.

    Notes about the default special keyword:

    • It can be used when the style is first updated and then needs to be reset to its initial value.
    • It doesn't use the color set in the BPMN source when the "BPMN in Color" support is enabled. It uses the color defined in the BPMN element default style.
  • Optional family?: string
  • Optional isBold?: boolean

    Default

    false
    
  • Optional isItalic?: boolean

    Default

    false
    
  • Optional isStrikeThrough?: boolean

    Default

    false
    
  • Optional isUnderline?: boolean

    Default

    false
    
  • Optional size?: number

    The type of the value is int (in px).