How to add font awesome in bpmn rendere

How to use font awsome in custom bpmn-js rendere ??

my code ::

function drawRect(parentNode, width, height, borderRadius, strokeColor,className) {

const rect = svgCreate(‘rect’);

svgAttr(rect, {
width: width,
height: height,
rx: borderRadius,
ry: borderRadius,
stroke: strokeColor || ‘#000’,
strokeWidth: 2,
// fill: ‘#fff
content:"\f304" // font
});

svgAppend(parentNode, rect);

svgClasses(rect).add(className);
return rect;
}

Using a svg rect is not the right way to render a svg as content. You could refer to the nyan cat example on how to use images, or you will have to find out using the svg icons directly, e.g. by using the use declaration: https://fontawesome.com/how-to-use/on-the-web/advanced/svg-sprites

1 Like

thank you very much.