From c573a6f81827594ceeffbfa058659e2fc20e4a1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= <tm@tlater.net>
Date: Tue, 13 Jun 2023 21:34:01 +0100
Subject: [PATCH] templates: Update to new font mixins

---
 templates/src/lib/scss/_fonts.scss | 42 ++++++++++++++----------------
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/templates/src/lib/scss/_fonts.scss b/templates/src/lib/scss/_fonts.scss
index 283bb77..68ec88f 100644
--- a/templates/src/lib/scss/_fonts.scss
+++ b/templates/src/lib/scss/_fonts.scss
@@ -1,29 +1,27 @@
 @use "~/node_modules/@fontsource/nunito/scss/mixins" as Nunito;
 @use "~/node_modules/@fontsource/arimo/scss/mixins" as Arimo;
 
-$weights: 300, 400, 500, 600, 700;
-
-@each $weight in $weights {
-  @include Nunito.fontFace(
-    $weight: $weight,
-    $display: auto,
-    $style: normal,
-    $fontDir: "npm:@fontsource/nunito/files"
-  );
-
-  @include Nunito.fontFace(
-    $weight: $weight,
-    $display: auto,
-    $style: italic,
-    $fontDir: "npm:@fontsource/nunito/files"
-  );
-}
-
-@include Arimo.fontFace(
-  $weight: 400,
+@include Nunito.faces(
+  $weights: (
+    300,
+    400,
+    500,
+    600,
+    700,
+  ),
   $display: auto,
-  $style: normal,
-  $fontDir: "npm:@fontsource/arimo/files"
+  $styles: (
+    normal,
+    italic,
+  ),
+  $directory: "npm:@fontsource/nunito/files"
+);
+
+@include Arimo.faces(
+  $weights: 400,
+  $display: auto,
+  $styles: normal,
+  $directory: "npm:@fontsource/arimo/files"
 );
 
 // Hack *does* come with its own CSS, but it's broken and hasn't seen