code: function parseFont(str, defaultHeight) {
    // Try for required properties first.
    var sizeFamily = sizeFamilyRe.exec(str);
    if (!sizeFamily) return; // invalid
    // Default values and required properties
  
    var font = {
      weight: 'normal',
      style: 'normal',
      stretch: 'normal',
      variant: 'normal',
      size: parseFloat(sizeFamily[1]),
      unit: sizeFamily[2],
      family: sizeFamily[3].replace(/ *, */g, ',')
    }; // Stop search at `sizeFamily.index`
  
    var substr = str.substring(0, sizeFamily.index); // Optional, unordered properties.
  
    var weight = weightRe.exec(substr),
        style = styleRe.exec(substr),
        variant = variantRe.exec(substr),
        stretch = stretchRe.exec(substr);
    if (weight) font.weight = weight[1];
    if (style) font.style = style[1];
    if (variant) font.variant = variant[1];
    if (stretch) font.stretch = stretch[1];
    font.size0 = font.size;
    font.size = (0, _utils.sizeToPixel)({
      size: font.size0,
      unit: font.unit
    }, defaultHeight);
  
    if (font.unit === 'vw' || font.unit === 'vh') {
      if (typeof document !== 'undefined' && document.documentElement) {
        var _document$documentEle = document.documentElement,
            clientWidth = _document$documentEle.clientWidth,
            clientHeight = _document$documentEle.clientHeight;
        var val = font.unit === 'vw' ? clientWidth : clientHeight;
        font.size = val * font.size / 100;
      }
    }
  
    return font;
  }
docs: /* eslint-enable prefer-template 
  Parse font `str`.
  
  @param {String} str
  @return {Object} Parsed font. `size` is in device units. `unit` is the unit
  appearing in the input string.
  @api private