From: Go MAEDA Date: Fri, 15 Nov 2024 00:50:14 +0000 (+0000) Subject: Optimize font loading by replacing variable fonts with specific weights for Noto... X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=30fe145df07eac27dd977c0899e2906e8f562a47;p=redmine.git Optimize font loading by replacing variable fonts with specific weights for Noto Sans (#41748). Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23275 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/assets/fonts/NotoSans-Bold.woff2 b/app/assets/fonts/NotoSans-Bold.woff2 new file mode 100644 index 000000000..52c48990f Binary files /dev/null and b/app/assets/fonts/NotoSans-Bold.woff2 differ diff --git a/app/assets/fonts/NotoSans-BoldItalic.woff2 b/app/assets/fonts/NotoSans-BoldItalic.woff2 new file mode 100644 index 000000000..8172d534d Binary files /dev/null and b/app/assets/fonts/NotoSans-BoldItalic.woff2 differ diff --git a/app/assets/fonts/NotoSans-Italic-VariableFont_wdth,wght.woff2 b/app/assets/fonts/NotoSans-Italic-VariableFont_wdth,wght.woff2 deleted file mode 100644 index a7a1e5196..000000000 Binary files a/app/assets/fonts/NotoSans-Italic-VariableFont_wdth,wght.woff2 and /dev/null differ diff --git a/app/assets/fonts/NotoSans-Italic.woff2 b/app/assets/fonts/NotoSans-Italic.woff2 new file mode 100644 index 000000000..4fc50076e Binary files /dev/null and b/app/assets/fonts/NotoSans-Italic.woff2 differ diff --git a/app/assets/fonts/NotoSans-Regular.woff2 b/app/assets/fonts/NotoSans-Regular.woff2 new file mode 100644 index 000000000..1a88667dd Binary files /dev/null and b/app/assets/fonts/NotoSans-Regular.woff2 differ diff --git a/app/assets/fonts/NotoSans-VariableFont_wdth,wght.woff2 b/app/assets/fonts/NotoSans-VariableFont_wdth,wght.woff2 deleted file mode 100644 index c9c4ebe95..000000000 Binary files a/app/assets/fonts/NotoSans-VariableFont_wdth,wght.woff2 and /dev/null differ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index fc8d32b8a..304f32284 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -6,18 +6,32 @@ @font-face { font-family: "Noto Sans"; - src: url("/NotoSans-VariableFont_wdth,wght.woff2") format("woff2"); - font-weight: 100 900; - font-stretch: 75% 125%; + src: url("/NotoSans-Regular.woff2") format("woff2"); + font-weight: 400; font-style: normal; font-display: swap; } @font-face { font-family: "Noto Sans"; - src: url("/NotoSans-Italic-VariableFont_wdth,wght.woff2") format("woff2"); - font-weight: 100 900; - font-stretch: 75% 125%; + src: url("/NotoSans-Bold.woff2") format("woff2"); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Noto Sans"; + src: url("/NotoSans-Italic.woff2") format("woff2"); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Noto Sans"; + src: url("/NotoSans-BoldItalic.woff2") format("woff2"); + font-weight: 700; font-style: italic; font-display: swap; }