setFontFamilyMethod = (val) => {
  const selectedElements = svgCanvas.getSelectedElements()
  const textElements = selectedElements.filter(el => el?.tagName === 'text')
  svgCanvas.setCurText('font_family', val)
  svgCanvas.changeSelectedAttribute('font-family', val, textElements)
  if (!textElements.some(el => el.textContent)) {
    svgCanvas.textActions.setCursor()
  }
}
Set the new font family.
@function module:svgcanvas.SvgCanvas#setFontFamily
@param {string} val - String with the new font family
@returns {void}