lib/icons-to-woff.js
function getSvgHeight (svg, filename) {
  const parseSvg = /<svg[^>]+height\s*=\s*["']?(\d+)\s*(pt|px|)["']?/i.exec(svg);
  if (!parseSvg) {
    throw new Error(`could not read height for '${filename}'.`);
  }
  return parseSvg[1];
}
function getSvgHeight (svg, filename) {
  const parseSvg = /<svg[^>]+height\s*=\s*["']?(\d+)\s*(pt|px|)["']?/i.exec(svg);
  if (!parseSvg) {
    throw new Error(`could not read height for '${filename}'.`);
  }
  return parseSvg[1];
}
function getSvgHeight ( svg , filename ) { const parseSvg = / <svg[^>]+height\s*=\s*["']?(\d+)\s*(pt|px|)["']? / i . exec ( svg ) ; if ( ! parseSvg ) { throw new Error ( ` ${ filename } ` ) ; } return parseSvg [ 1 ] ; }
Reads the height of the svg

@param  {String} svg      the svg content
@param  {String} filename the file name for error reporting
@return {Number}          height
Reads the height of the svg