_fonts.scss 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // The font filenames and folders are normalized.
  2. // Using TTF, WOFF and WOFF2
  3. @mixin font-face($font, $weight, $style) {
  4. $src: null;
  5. @if $weight == bold and $style == normal {
  6. $src: '../fonts/' + $font + '/' + $font + '-bold/' + $font + '-bold';
  7. } @else if $weight == normal and $style == italic {
  8. $src: '../fonts/' + $font + '/' + $font + '-italic/' + $font + '-italic';
  9. } @else if $weight == bold and $style == italic {
  10. $src: '../fonts/' + $font + '/' + $font + '-bold-italic/' + $font + '-bold-italic';
  11. } @else if $weight == normal and $style == normal {
  12. $src: '../fonts/' + $font + '/' + $font + '-regular/' + $font + '-regular';
  13. }
  14. @font-face {
  15. font-family: $font; // font name, first letter capitalized
  16. font-weight: unquote($weight); // bold or normal
  17. font-style: unquote($style); // italic or normal
  18. src: url($src + '.ttf') format('truetype'),
  19. url($src + '.woff') format('woff'),
  20. url($src + '.woff2') format('woff2');
  21. }
  22. }
  23. // Import fonts
  24. @include font-face('Lato', 'bold', 'normal');
  25. @include font-face('Lato', 'normal', 'italic');
  26. @include font-face('Lato', 'bold', 'italic');
  27. @include font-face('Lato', 'normal', 'normal');
  28. @include font-face('Syne', 'bold', 'normal');
  29. @include font-face('Syne', 'normal', 'normal');
  30. @include font-face('Avara', 'bold', 'italic');
  31. @include font-face('ManifontGrotesk', 'bold', 'italic');
  32. @include font-face('ManifontGrotesk', 'normal', 'italic');
  33. @include font-face('PlayfairDisplay', 'normal', 'italic');
  34. @include font-face('Rumeur', 'bold', 'normal');
  35. @include font-face('Moche', 'bold', 'normal');
  36. @include font-face('Redaction50', 'bold', 'normal');