From d27f661b46734e1aa035c0fa8f929254a20a7ea1 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 19 Jan 2021 14:20:43 -0500 Subject: [PATCH] Merge pull request #2312 from jarnedemeulemeester/use-local-noto-sans Use local version of Noto Sans if available (cherry picked from commit 798df9b05072b8612bc29eec024be06a86dd85d0) Signed-off-by: Joshua M. Boniface --- src/styles/noto-sans/index.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/styles/noto-sans/index.scss b/src/styles/noto-sans/index.scss index 8227dd1166..3611eaf02f 100644 --- a/src/styles/noto-sans/index.scss +++ b/src/styles/noto-sans/index.scss @@ -1,3 +1,6 @@ +// Map font weight numbers to names +$weight-names: (100: "Thin", 200: "ExtraLight", 300: "Light", 400: "Regular", 500: "Medium", 600: "SemiBold", 700: "Bold", 800: "ExtraBold", 900: "Black"); + // Mixin to help create the Noto Sans font-faces @mixin fontFace($family: "Noto Sans", $style: normal, $weight: 400, $url: null, $range: null) { @font-face { @@ -5,7 +8,7 @@ font-style: $style; font-display: swap; font-weight: $weight; - src: url($url) format("woff2"); + src: local($family), local("#{$family} #{map-get($weight-names, $weight)}"), url($url) format("woff2"); unicode-range: $range; } }