@use "sass:map";

// 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 face($family: "Noto Sans", $style: normal, $weight: 400, $url: null, $range: null) {
    @font-face {
        font-family: $family;
        font-style: $style;
        font-display: swap;
        font-weight: $weight;
        src: local($family), local("#{$family} #{map.get($weight-names, $weight)}"), url($url) format("woff2");
        unicode-range: $range;
    }
}
