@import 'mixins/type';


$font-library: (
    "NunitoSans": (
        "-Bold": (
            style: normal,
            weight: bold
        ),
        "-SemiBold": (
            style: normal,
            weight: 600
        ),
        "-Regular": (
            style: normal,
            weight: normal
        ),
        "-Italic": (
            style: italic,
            weight: normal
        ),
        "-Light": (
            style: normal,
            weight: 300
        )
    ),
);


@each $typeface, $variants in $font-library {
    @each $variant, $props in $variants {
        @at-root {
            @font-face {
                font-family: "#{$typeface}";
                //src:    url("fonts/#{$typeface}#{$variant}.eot");     IE9
                src:    local("#{$typeface}"),
                        url("fonts/#{$typeface}#{$variant}.woff2") format("woff2"),
                        url("fonts/#{$typeface}#{$variant}.woff") format("woff");
                font-style: #{map-get($props, style)};
                font-weight: #{map-get($props, weight)};
                font-display: swap;
            }
        }
    }
}

.smooth-text {
  @include font-smoothing;
}
