@mixin fontface($font-name, $fontface-path, $fontface-prefix, $type, $weight, $style) {
  @font-face {
    font-family: $font-name;
    src: url('#{$fontface-path}/#{$fontface-prefix}-#{$type}.eot');
    src: local('#{$font-name} #{$type}'),
         local('#{$fontface-prefix}-#{$type}'),
         url('#{$fontface-path}/#{$fontface-prefix}-#{$type}.eot?#iefix') format('embedded-opentype'),
         url('#{$fontface-path}/#{$fontface-prefix}-#{$type}.woff2') format('woff2'),
         url('#{$fontface-path}/#{$fontface-prefix}-#{$type}.woff') format('woff'),
         url('#{$fontface-path}/#{$fontface-prefix}-#{$type}.ttf') format('truetype'),
         url('#{$fontface-path}/#{$fontface-prefix}-#{$type}.svg##{$fontface-prefix}-#{$type}') format('svg');
    font-weight: $weight;
    font-style: $style;
  }
}

@mixin fontface-modern($font-name, $fontface-path, $fontface-prefix, $type, $weight, $style) {
  @font-face {
    font-family: $font-name;
    src: local('#{$font-name} #{$type}'),
         local('#{$fontface-prefix}-#{$type}'),
         url('#{$fontface-path}/#{$fontface-prefix}-#{$type}.woff2') format('woff2');
    font-weight: $weight;
    font-style: $style;
  }
}

$notosans-fontface-path: '../fonts' !default;

@mixin notosans-fontface($type, $weight, $style) {
  @include fontface('Noto Sans', $notosans-fontface-path, 'NotoSans', $type, $weight, $style)
}

@mixin notosans-fontface-modern($type, $weight, $style) {
  @include fontface-modern('Noto Sans', $notosans-fontface-path, 'NotoSans', $type, $weight, $style)
}
