getFontParameters = function (fontSpec) {
  const match = fontSpec.match(fontRegEx);
  if (!match) {
    return null;
  }
  const style = /** @type {FontParameters} */ ({
    lineHeight: 'normal',
    size: '1.2em',
    style: 'normal',
    weight: '400',
    variant: 'normal',
  });
  for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {
    const value = match[i + 1];
    if (value !== undefined) {
      style[fontRegExMatchIndex[i]] =
        typeof value === 'string' ? value.trim() : value;
    }
  }
  if (isNaN(Number(style.weight)) && style.weight in fontWeights) {
    style.weight = fontWeights[style.weight];
  }
  style.families = style.family
    .split(/,\s?/)
    .map((f) => f.trim().replace(/^['"]|['"]$/g, ''));
  return style;
}
Get the list of font families from a font spec.  Note that this doesn't work
for font families that have commas in them.
@param {string} fontSpec The CSS font property.
@return {FontParameters|null} The font parameters (or null if the input spec is invalid).