// RenderKit
// github.com/matteobertoldo/renderkit
// Licensed under MIT Open Source

/// Mixin for importing Google Fonts and/or `@font-face` fonts globally.
/// @group _global renderkit
@mixin global-fonts {
    @if ($google-fonts-load) {
        @import url('https://fonts.googleapis.com/css?family=#{$google-fonts-family}');
    }

    @if ($font-face-load) {
        @each $font-family, $property in $font-face-map {
            $font-file: nth($property, 1);
            $font-style: nth($property, 2);
            $font-weight: nth($property, 3);
            $extensions: nth($property, 4);

            @include font-face($font-family, $font-file, $font-style, $font-weight, $extensions);
        }
    }
}
