@use "@fontsource-utils/scss/src/mixins" as fontsource with (
  $display: auto
);
@use "@fontsource-variable/arimo/scss/metadata.scss" as arimo;
@use "@fontsource-variable/nunito/scss/metadata.scss" as nunito;

@include fontsource.faces(
  $metadata: nunito.$metadata,
  $weights: (
    300,
    400,
    500,
    600,
    700,
  ),
  $subsets: latin,
  $styles: (
    normal,
    italic,
  ),
  $family: "Nunito",
  $directory: "/@fontsource-variable/nunito"
);

@include fontsource.faces(
  $metadata: arimo.$metadata,
  $weights: 400,
  $subsets: latin,
  $styles: normal,
  $family: "Arimo",
  $directory: "/@fontsource-variable/arimo"
);

// Hack *does* come with its own CSS, but it's broken and hasn't seen
// a release since https://github.com/source-foundry/Hack/issues/467
// was resolved.

$variants: regular normal 400, bold normal 700, italic italic 400, bolditalic italic 700;

@each $name, $style, $weights in $variants {
  @font-face {
    font-family: "Hack";
    font-style: $style;
    font-display: auto;
    font-weight: $weights;
    src: url("/hack-font/hack-#{$name}-subset.woff2") format("woff2-variations");
  }
}
