$josefinsans-font-path: '/static/fonts/JosefinSans' !default;

@mixin josefinsans-font($type, $weight, $style: normal) {
	@font-face {
		font-family: 'Josefin Sans';
		src: url('#{$josefinsans-font-path}/josefinsans-#{$type}-webfont.woff2') format('woff2'),
		url('#{$josefinsans-font-path}/josefinsans-#{$type}-webfont.woff') format('woff');
		font-weight: $weight;
		font-style: $style;
	}
}

@mixin josefinsans-font-pair($type, $weight) {
	@include josefinsans-font($type, $weight);
	@include josefinsans-font(#{$type}Italic, $weight, italic);
}

@include josefinsans-font-pair('thin', 100);
@include josefinsans-font-pair('light', 300);
@include josefinsans-font-pair('regular', 400);
@include josefinsans-font-pair('semibold', 600);
@include josefinsans-font-pair('bold', 700);
