// ============================================================================
// :: Font
// ============================================================================
/**
 * These mixins are defined to use or load a local font file into the project.
 * Try to keep font files locally so we don't have to rely on hosting from
 * a third party.
 */

/**
 * Use this mixin to load in a local font file. Every version of the font should
 * have the same name
 *
 * Params:
 * $name: a name given to the font
 * $url: location of the font file
 * $weight: the weight (100, 300, 400, ...) the font file is based on
 * $style: the style (italic, normal, ...) the font file is based on
 */
@mixin get-font($name, $url, $weight: normal, $style: normal) {

	@font-face {
		font-family: $name;
		src: url($url +".eot");
		src:
			url($url + ".eot?#iefix") format("embedded-opentype"),
			url($url + ".woff") format("woff"),
			url($url + ".ttf") format("truetype"),
			url($url + ".svg#icon") format("svg");

		font-weight: $weight;
		font-style: $style;
		font-display: swap;
	}
}
