// The font filenames and folders are normalized.
// Using TTF, WOFF and WOFF2

@mixin font-face($font, $weight, $style) {
  $src: null;

  @if $weight == bold and $style == normal {
    $src: '../fonts/' + $font + '/' + $font + '-bold/' + $font + '-bold';
  } @else if $weight == normal and $style == italic {
    $src: '../fonts/' + $font + '/' + $font + '-italic/' + $font + '-italic';
  } @else if $weight == bold and $style == italic {
    $src: '../fonts/' + $font + '/' + $font + '-bold-italic/' + $font + '-bold-italic';
  } @else if $weight == normal and $style == normal {
    $src: '../fonts/' + $font + '/' + $font + '-regular/' + $font + '-regular';
  }

  @font-face {
    font-family: $font; // font name, first letter capitalized
    font-weight: unquote($weight); // bold or normal
    font-style: unquote($style); // italic or normal
    src:  url($src + '.ttf') format('truetype'),
          url($src + '.woff') format('woff'),
          url($src + '.woff2') format('woff2');
  }
}

// Import fonts

@include font-face('Lato', 'bold', 'normal');
@include font-face('Lato', 'normal', 'italic');
@include font-face('Lato', 'bold', 'italic');
@include font-face('Lato', 'normal', 'normal');

@include font-face('Syne', 'bold', 'normal');
@include font-face('Syne', 'normal', 'normal');

@include font-face('Avara', 'bold', 'italic');
@include font-face('ManifontGrotesk', 'bold', 'italic');
@include font-face('ManifontGrotesk', 'normal', 'italic');
@include font-face('PlayfairDisplay', 'normal', 'italic');
@include font-face('Rumeur', 'bold', 'normal');
@include font-face('Moche', 'bold', 'normal');
@include font-face('Redaction50', 'bold', 'normal');
