|
|
@@ -33,7 +33,7 @@ this.fontsAltMinifier = this.fontsAltMinifier || (() => {
|
|
|
const REGEXP_FONT_FORMAT = /\.([^.?#]+)((\?|#).*?)?$/;
|
|
|
const REGEXP_FONT_FORMAT_VALUE = /format\((.*?)\)\s*,?$/;
|
|
|
const REGEXP_FONT_SRC = /(.*?)\s*,?$/;
|
|
|
- const EMPTY_URL_SOURCE = /^url\(["']?data:base64,["']?\)/;
|
|
|
+ const EMPTY_URL_SOURCE = /^url\(["']?data:[^,]*,["']?\)/;
|
|
|
const LOCAL_SOURCE = "local(";
|
|
|
const MEDIA_ALL = "all";
|
|
|
const FONT_WEIGHTS = {
|
|
|
@@ -78,6 +78,7 @@ this.fontsAltMinifier = this.fontsAltMinifier || (() => {
|
|
|
});
|
|
|
processFontDetails(fontsDetails);
|
|
|
sheetIndex = 0;
|
|
|
+ debugger
|
|
|
stylesheets.forEach(stylesheetInfo => {
|
|
|
const cssRules = stylesheetInfo.stylesheet.children;
|
|
|
const media = stylesheetInfo.mediaText;
|
|
|
@@ -190,6 +191,9 @@ this.fontsAltMinifier = this.fontsAltMinifier || (() => {
|
|
|
}
|
|
|
|
|
|
function processFontFaceRule(ruleData, fontInfo, stats) {
|
|
|
+ if (cssTree.generate(ruleData).includes("-bold")) {
|
|
|
+ debugger
|
|
|
+ }
|
|
|
const findSource = fontFormat => fontInfo.find(source => !source.src.match(EMPTY_URL_SOURCE) && source.format == fontFormat);
|
|
|
const filterSource = fontSource => fontInfo.filter(source => source == fontSource || source.src.startsWith(LOCAL_SOURCE));
|
|
|
stats.fonts.processed += fontInfo.length;
|