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; } }