From c2da016469427b2ffebaab0d38ca36b81281420c Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Fri, 22 Dec 2017 17:50:06 -0500 Subject: Bug 1426390 - Serve WOFF2 Fira Sans font --- skins/standard/fira/FiraMono-Bold.woff | Bin 94732 -> 0 bytes skins/standard/fira/FiraMono-Regular.woff | Bin 86572 -> 0 bytes skins/standard/fira/FiraSans-Bold.woff | Bin 198080 -> 0 bytes skins/standard/fira/FiraSans-BoldItalic.woff | Bin 209004 -> 0 bytes skins/standard/fira/FiraSans-Italic.woff | Bin 192184 -> 0 bytes skins/standard/fira/FiraSans-Regular.woff | Bin 183268 -> 0 bytes skins/standard/fira/FiraSans-SemiBold.woff | Bin 198128 -> 0 bytes skins/standard/fira/FiraSans-SemiBoldItalic.woff | Bin 208040 -> 0 bytes skins/standard/fonts/FiraMono-Bold.woff | Bin 0 -> 94732 bytes skins/standard/fonts/FiraMono-Bold.woff2 | Bin 0 -> 70360 bytes skins/standard/fonts/FiraMono-Regular.woff | Bin 0 -> 86572 bytes skins/standard/fonts/FiraMono-Regular.woff2 | Bin 0 -> 64868 bytes skins/standard/fonts/FiraSans-Bold.woff | Bin 0 -> 195040 bytes skins/standard/fonts/FiraSans-Bold.woff2 | Bin 0 -> 161132 bytes skins/standard/fonts/FiraSans-BoldItalic.woff | Bin 0 -> 204440 bytes skins/standard/fonts/FiraSans-BoldItalic.woff2 | Bin 0 -> 169136 bytes skins/standard/fonts/FiraSans-Italic.woff | Bin 0 -> 196448 bytes skins/standard/fonts/FiraSans-Italic.woff2 | Bin 0 -> 163416 bytes skins/standard/fonts/FiraSans-Regular.woff | Bin 0 -> 186516 bytes skins/standard/fonts/FiraSans-Regular.woff2 | Bin 0 -> 154104 bytes skins/standard/fonts/FiraSans-SemiBold.woff | Bin 0 -> 194640 bytes skins/standard/fonts/FiraSans-SemiBold.woff2 | Bin 0 -> 161080 bytes skins/standard/fonts/FiraSans-SemiBoldItalic.woff | Bin 0 -> 203212 bytes skins/standard/fonts/FiraSans-SemiBoldItalic.woff2 | Bin 0 -> 168336 bytes skins/standard/global.css | 24 ++++++++++++++------- t/css.t | 2 +- 26 files changed, 17 insertions(+), 9 deletions(-) delete mode 100644 skins/standard/fira/FiraMono-Bold.woff delete mode 100644 skins/standard/fira/FiraMono-Regular.woff delete mode 100644 skins/standard/fira/FiraSans-Bold.woff delete mode 100644 skins/standard/fira/FiraSans-BoldItalic.woff delete mode 100644 skins/standard/fira/FiraSans-Italic.woff delete mode 100644 skins/standard/fira/FiraSans-Regular.woff delete mode 100644 skins/standard/fira/FiraSans-SemiBold.woff delete mode 100644 skins/standard/fira/FiraSans-SemiBoldItalic.woff create mode 100644 skins/standard/fonts/FiraMono-Bold.woff create mode 100644 skins/standard/fonts/FiraMono-Bold.woff2 create mode 100644 skins/standard/fonts/FiraMono-Regular.woff create mode 100644 skins/standard/fonts/FiraMono-Regular.woff2 create mode 100644 skins/standard/fonts/FiraSans-Bold.woff create mode 100644 skins/standard/fonts/FiraSans-Bold.woff2 create mode 100644 skins/standard/fonts/FiraSans-BoldItalic.woff create mode 100644 skins/standard/fonts/FiraSans-BoldItalic.woff2 create mode 100644 skins/standard/fonts/FiraSans-Italic.woff create mode 100644 skins/standard/fonts/FiraSans-Italic.woff2 create mode 100644 skins/standard/fonts/FiraSans-Regular.woff create mode 100644 skins/standard/fonts/FiraSans-Regular.woff2 create mode 100644 skins/standard/fonts/FiraSans-SemiBold.woff create mode 100644 skins/standard/fonts/FiraSans-SemiBold.woff2 create mode 100644 skins/standard/fonts/FiraSans-SemiBoldItalic.woff create mode 100644 skins/standard/fonts/FiraSans-SemiBoldItalic.woff2 diff --git a/skins/standard/fira/FiraMono-Bold.woff b/skins/standard/fira/FiraMono-Bold.woff deleted file mode 100644 index 735352fb9..000000000 Binary files a/skins/standard/fira/FiraMono-Bold.woff and /dev/null differ diff --git a/skins/standard/fira/FiraMono-Regular.woff b/skins/standard/fira/FiraMono-Regular.woff deleted file mode 100644 index b38ee144d..000000000 Binary files a/skins/standard/fira/FiraMono-Regular.woff and /dev/null differ diff --git a/skins/standard/fira/FiraSans-Bold.woff b/skins/standard/fira/FiraSans-Bold.woff deleted file mode 100644 index a8dba6487..000000000 Binary files a/skins/standard/fira/FiraSans-Bold.woff and /dev/null differ diff --git a/skins/standard/fira/FiraSans-BoldItalic.woff b/skins/standard/fira/FiraSans-BoldItalic.woff deleted file mode 100644 index 54895de69..000000000 Binary files a/skins/standard/fira/FiraSans-BoldItalic.woff and /dev/null differ diff --git a/skins/standard/fira/FiraSans-Italic.woff b/skins/standard/fira/FiraSans-Italic.woff deleted file mode 100644 index 298019498..000000000 Binary files a/skins/standard/fira/FiraSans-Italic.woff and /dev/null differ diff --git a/skins/standard/fira/FiraSans-Regular.woff b/skins/standard/fira/FiraSans-Regular.woff deleted file mode 100644 index d8e0363f4..000000000 Binary files a/skins/standard/fira/FiraSans-Regular.woff and /dev/null differ diff --git a/skins/standard/fira/FiraSans-SemiBold.woff b/skins/standard/fira/FiraSans-SemiBold.woff deleted file mode 100644 index 8b408d4d0..000000000 Binary files a/skins/standard/fira/FiraSans-SemiBold.woff and /dev/null differ diff --git a/skins/standard/fira/FiraSans-SemiBoldItalic.woff b/skins/standard/fira/FiraSans-SemiBoldItalic.woff deleted file mode 100644 index 2592e4fcf..000000000 Binary files a/skins/standard/fira/FiraSans-SemiBoldItalic.woff and /dev/null differ diff --git a/skins/standard/fonts/FiraMono-Bold.woff b/skins/standard/fonts/FiraMono-Bold.woff new file mode 100644 index 000000000..735352fb9 Binary files /dev/null and b/skins/standard/fonts/FiraMono-Bold.woff differ diff --git a/skins/standard/fonts/FiraMono-Bold.woff2 b/skins/standard/fonts/FiraMono-Bold.woff2 new file mode 100644 index 000000000..832aaabbb Binary files /dev/null and b/skins/standard/fonts/FiraMono-Bold.woff2 differ diff --git a/skins/standard/fonts/FiraMono-Regular.woff b/skins/standard/fonts/FiraMono-Regular.woff new file mode 100644 index 000000000..b38ee144d Binary files /dev/null and b/skins/standard/fonts/FiraMono-Regular.woff differ diff --git a/skins/standard/fonts/FiraMono-Regular.woff2 b/skins/standard/fonts/FiraMono-Regular.woff2 new file mode 100644 index 000000000..9fa44b7cc Binary files /dev/null and b/skins/standard/fonts/FiraMono-Regular.woff2 differ diff --git a/skins/standard/fonts/FiraSans-Bold.woff b/skins/standard/fonts/FiraSans-Bold.woff new file mode 100644 index 000000000..21b0b7ce1 Binary files /dev/null and b/skins/standard/fonts/FiraSans-Bold.woff differ diff --git a/skins/standard/fonts/FiraSans-Bold.woff2 b/skins/standard/fonts/FiraSans-Bold.woff2 new file mode 100644 index 000000000..b544c1250 Binary files /dev/null and b/skins/standard/fonts/FiraSans-Bold.woff2 differ diff --git a/skins/standard/fonts/FiraSans-BoldItalic.woff b/skins/standard/fonts/FiraSans-BoldItalic.woff new file mode 100644 index 000000000..a48dbf8f8 Binary files /dev/null and b/skins/standard/fonts/FiraSans-BoldItalic.woff differ diff --git a/skins/standard/fonts/FiraSans-BoldItalic.woff2 b/skins/standard/fonts/FiraSans-BoldItalic.woff2 new file mode 100644 index 000000000..751a3c0c7 Binary files /dev/null and b/skins/standard/fonts/FiraSans-BoldItalic.woff2 differ diff --git a/skins/standard/fonts/FiraSans-Italic.woff b/skins/standard/fonts/FiraSans-Italic.woff new file mode 100644 index 000000000..1ee12bfb0 Binary files /dev/null and b/skins/standard/fonts/FiraSans-Italic.woff differ diff --git a/skins/standard/fonts/FiraSans-Italic.woff2 b/skins/standard/fonts/FiraSans-Italic.woff2 new file mode 100644 index 000000000..2bd1af5b6 Binary files /dev/null and b/skins/standard/fonts/FiraSans-Italic.woff2 differ diff --git a/skins/standard/fonts/FiraSans-Regular.woff b/skins/standard/fonts/FiraSans-Regular.woff new file mode 100644 index 000000000..1ea1030bc Binary files /dev/null and b/skins/standard/fonts/FiraSans-Regular.woff differ diff --git a/skins/standard/fonts/FiraSans-Regular.woff2 b/skins/standard/fonts/FiraSans-Regular.woff2 new file mode 100644 index 000000000..7c87e0633 Binary files /dev/null and b/skins/standard/fonts/FiraSans-Regular.woff2 differ diff --git a/skins/standard/fonts/FiraSans-SemiBold.woff b/skins/standard/fonts/FiraSans-SemiBold.woff new file mode 100644 index 000000000..ce680eb06 Binary files /dev/null and b/skins/standard/fonts/FiraSans-SemiBold.woff differ diff --git a/skins/standard/fonts/FiraSans-SemiBold.woff2 b/skins/standard/fonts/FiraSans-SemiBold.woff2 new file mode 100644 index 000000000..bd9cadb43 Binary files /dev/null and b/skins/standard/fonts/FiraSans-SemiBold.woff2 differ diff --git a/skins/standard/fonts/FiraSans-SemiBoldItalic.woff b/skins/standard/fonts/FiraSans-SemiBoldItalic.woff new file mode 100644 index 000000000..d45f8a446 Binary files /dev/null and b/skins/standard/fonts/FiraSans-SemiBoldItalic.woff differ diff --git a/skins/standard/fonts/FiraSans-SemiBoldItalic.woff2 b/skins/standard/fonts/FiraSans-SemiBoldItalic.woff2 new file mode 100644 index 000000000..e38b7ed5a Binary files /dev/null and b/skins/standard/fonts/FiraSans-SemiBoldItalic.woff2 differ diff --git a/skins/standard/global.css b/skins/standard/global.css index 9b9ae6550..a00839de9 100644 --- a/skins/standard/global.css +++ b/skins/standard/global.css @@ -993,7 +993,8 @@ input.required, select.required, span.required_explanation { @font-face{ font-family: 'Fira Sans'; src: local('Fira Sans'), local('FiraSans'), - url('fira/FiraSans-Regular.woff') format('woff'); + url('fonts/FiraSans-Regular.woff2?v=4.203') format('woff2'), + url('fonts/FiraSans-Regular.woff?v=4.203') format('woff'); font-weight: 400; font-style: normal; } @@ -1001,7 +1002,8 @@ input.required, select.required, span.required_explanation { @font-face{ font-family: 'Fira Sans'; src: local('Fira Sans Italic'), local('FiraSansItalic'), - url('fira/FiraSans-Italic.woff') format('woff'); + url('fonts/FiraSans-Italic.woff2?v=4.203') format('woff2'), + url('fonts/FiraSans-Italic.woff?v=4.203') format('woff'); font-weight: 400; font-style: italic; } @@ -1009,7 +1011,8 @@ input.required, select.required, span.required_explanation { @font-face{ font-family: 'Fira Sans'; src: local('Fira Sans SemiBold'), local('FiraSansSemiBold'), - url('fira/FiraSans-SemiBold.woff') format('woff'); + url('fonts/FiraSans-SemiBold.woff2?v=4.203') format('woff2'), + url('fonts/FiraSans-SemiBold.woff?v=4.203') format('woff'); font-weight: 600; font-style: normal; } @@ -1017,7 +1020,8 @@ input.required, select.required, span.required_explanation { @font-face{ font-family: 'Fira Sans'; src: local('Fira Sans SemiBold Italic'), local('FiraSansSemiBoldItalic'), - url('fira/FiraSans-SemiBoldItalic.woff') format('woff'); + url('fonts/FiraSans-SemiBoldItalic.woff2?v=4.203') format('woff2'), + url('fonts/FiraSans-SemiBoldItalic.woff?v=4.203') format('woff'); font-weight: 600; font-style: italic; } @@ -1025,7 +1029,8 @@ input.required, select.required, span.required_explanation { @font-face{ font-family: 'Fira Sans'; src: local('Fira Sans Bold'), local('FiraSansBold'), - url('fira/FiraSans-Bold.woff') format('woff'); + url('fonts/FiraSans-Bold.woff2?v=4.203') format('woff2'), + url('fonts/FiraSans-Bold.woff?v=4.203') format('woff'); font-weight: 700; font-style: normal; } @@ -1033,7 +1038,8 @@ input.required, select.required, span.required_explanation { @font-face{ font-family: 'Fira Sans'; src: local('Fira Sans Bold Italic'), local('FiraSansBoldItalic'), - url('fira/FiraSans-BoldItalic.woff') format('woff'); + url('fonts/FiraSans-BoldItalic.woff2?v=4.203') format('woff2'), + url('fonts/FiraSans-BoldItalic.woff?v=4.203') format('woff'); font-weight: 700; font-style: italic; } @@ -1041,7 +1047,8 @@ input.required, select.required, span.required_explanation { @font-face{ font-family: 'Fira Mono'; src: local('Fira Mono'), local('FiraMono'), - url('fira/FiraMono-Regular.woff') format('woff'); + url('fonts/FiraMono-Regular.woff2?v=3.202') format('woff2'), + url('fonts/FiraMono-Regular.woff?v=3.202') format('woff'); font-weight: 400; font-style: normal; } @@ -1049,7 +1056,8 @@ input.required, select.required, span.required_explanation { @font-face{ font-family: 'Fira Mono'; src: local('Fira Mono Bold'), local('FiraMonoBold'), - url('fira/FiraMono-Bold.woff') format('woff'); + url('fonts/FiraMono-Bold.woff2?v=3.202') format('woff2'), + url('fonts/FiraMono-Bold.woff?v=3.202') format('woff'); font-weight: 600; font-style: normal; } diff --git a/t/css.t b/t/css.t index 84d1ae3f0..a64cadea6 100644 --- a/t/css.t +++ b/t/css.t @@ -22,7 +22,7 @@ find( if (/\.css$/) { my $css_file = $File::Find::name; my $content = read_file($_); - while ($content =~ m{url\(["']?([^\)"']+)['"]?\)}g) { + while ($content =~ m{url\(["']?([^\?\)"']+)(?:\?.+)?['"]?\)}g) { my $file = $1; my $file_rel_root = File::Spec->abs2rel(realpath(File::Spec->rel2abs($file)), $root); -- cgit v1.2.3-24-g4f1b