processCSSFonts(win, href, css) {
    var serializer = this;
    var fonts = css.match(/@font-face *?{[\s\S]*?}/g);
    if (fonts) {
      var nestingDepth = this.windowDepth(win);
      var escapedQuote = this.escapedCharacter('"', nestingDepth);
      for (var i = 0; i < fonts.length; i++) {
        // Convert url specified in font to fully qualified url.
        var font = fonts[i].replace(/url\("(.*?)"\)/g, function(match, url) {
          // If href is null the url must be a fully qualified url.
          url = href ? serializer.qualifiedFontUrl(href, url) : url;
          return serializer.wrapUrl(url);
        }).
        replace(/"/g, escapedQuote);
        this.fontCSS.push(font);
      }
    }
  }
/**
   * Takes a string representing CSS and parses it to find any fonts that are
   * declared.  If any fonts are declared, it processes them so that they
   * can be used in the serialized document and adds them to |this.fontCSS|.
   *
   * @param {Window} win The Window of the Document being serialized.
   * @param {string} href The url at which the CSS stylesheet is located.
   * @param {string} css The CSS text.
   */
Takes a string representing CSS and parses it to find any fonts that are
declared.  If any fonts are declared, it processes them so that they
can be used in the serialized document and adds them to |this.fontCSS|.

@param {Window} win The Window of the Document being serialized.
@param {string} href The url at which the CSS stylesheet is located.
@param {string} css The CSS text.
Takes a string representing CSS and parses it to find any fonts that are declared . If any fonts are declared it processes them so that they can be used in the serialized document and adds them to |this . fontCSS| . @param { Window } win The Window of the Document being serialized . @param { string } href The url at which the CSS stylesheet is located . @param { string } css The CSS text .
processCSSFonts(win, href, css) {
    var serializer = this;
    var fonts = css.match(/@font-face *?{[\s\S]*?}/g);
    if (fonts) {
      var nestingDepth = this.windowDepth(win);
      var escapedQuote = this.escapedCharacter('"', nestingDepth);
      for (var i = 0; i < fonts.length; i++) {
        var font = fonts[i].replace(/url\("(.*?)"\)/g, function(match, url) {
          url = href ? serializer.qualifiedFontUrl(href, url) : url;
          return serializer.wrapUrl(url);
        }).
        replace(/"/g, escapedQuote);
        this.fontCSS.push(font);
      }
    }
  }
processCSSFonts ( win , href , css ) { var serializer = this ; var fonts = css . match ( / @font-face *?{[\s\S]*?} / g ) ; if ( fonts ) { var nestingDepth = this . windowDepth ( win ) ; var escapedQuote = this . escapedCharacter ( '"' , nestingDepth ) ; for ( var i = 0 ; i < fonts . length ; i ++ ) { var font = fonts [ i ] . replace ( / url\("(.*?)"\) / g , function ( match , url ) { url = href ? serializer . qualifiedFontUrl ( href , url ) : url ; return serializer . wrapUrl ( url ) ; } ) . replace ( / " / g , escapedQuote ) ; this . fontCSS . push ( font ) ; } } }
Takes a string representing CSS and parses it to find any fonts that are
 declared.
Takes a string representing CSS and parses it to find any fonts that are declared .
// Convert url specified in font to fully qualified url. // If href is null the url must be a fully qualified url.