/**
 * Declare font face - used in src/scss/03-base/_fonts.scss
 *
 * @author Nicolas Langle
 *
 * @param $font-family
 * @param $font-filename
 * @param $font-weight
 * @param $font-style
 * @param $font-stretch
 * @param $font-format
 *
 * Examples :
 *
 *      // For Classic font
 *      @include declare-font-face("My classic font", "../fonts/gmy-classic-font-regular", 400);
 *      @include declare-font-face("My classic font", "../fonts/gmy-classic-font-regular-italic", 400, italic);
 *      @include declare-font-face("My classic font", "../fonts/gmy-classic-font-bold", 700);
 *      ...
 *
 *      // For Variable font
 *      @include declare-font-face("My variable font", "../fonts/my-variable-font", 100 950, normal, normal, "woff2-variations");
 *      ...
 *
 */

@mixin declare-font-face($font-family, $font-filename, $font-weight : normal, $font-style : normal, $font-stretch : normal, $font-format : "woff2") {
	@font-face {
		font-family: "#{$font-family}";
		font-style: $font-style;
		font-weight: $font-weight;
		font-stretch: $font-stretch;
		src: url(#{$font-filename}.woff2) format("#{$font-format}");
		font-display: swap;
		unicode-range: U+0-10FFFF; /* cutting of the font file for better loading */
	}
}
