From e201c1948eaabb9c91204d80b755c6e9a9d02ee2 Mon Sep 17 00:00:00 2001
From: Felix	Boerner <ich@felix-boerner.de>
Date: Fri, 31 May 2024 21:02:24 +0000
Subject: [PATCH] feat: self-host fonts

---
 static/fonts/lora-v35-latin-regular.woff2       |    0 
 assets/scss/split.scss                          |    1 
 assets/scss/_fonts.scss                         |   30 +++++++++++++++
 static/fonts/montserrat-v26-latin-600.woff2     |    0 
 static/fonts/montserrat-v26-latin-regular.woff2 |    0 
 tests/exampleSiteWithVideo/budget.mobile.json   |    8 ++--
 tests/exampleSiteWithImage/budget.mobile.json   |    8 ++--
 assets/scss/_content.scss                       |    7 ---
 tests/exampleSiteWithImage/budget.desktop.json  |    8 ++--
 tests/exampleSiteWithVideo/budget.desktop.json  |    8 ++--
 10 files changed, 47 insertions(+), 23 deletions(-)

diff --git a/assets/scss/_content.scss b/assets/scss/_content.scss
index 48ad57e..39f74ba 100644
--- a/assets/scss/_content.scss
+++ b/assets/scss/_content.scss
@@ -1,11 +1,4 @@
 //-------------------------------------------------------------------------------
-// Google Font Import
-//-------------------------------------------------------------------------------
-
-@import url('https://fonts.googleapis.com/css?family=Montserrat:400,600');
-@import url('https://fonts.googleapis.com/css?family=Lora');
-
-//-------------------------------------------------------------------------------
 // Fade In
 //-------------------------------------------------------------------------------
 
diff --git a/assets/scss/_fonts.scss b/assets/scss/_fonts.scss
new file mode 100644
index 0000000..80d1448
--- /dev/null
+++ b/assets/scss/_fonts.scss
@@ -0,0 +1,30 @@
+//-------------------------------------------------------------------------------
+// Fonts - https://gwfh.mranftl.com/
+//-------------------------------------------------------------------------------
+
+/* montserrat-regular - latin */
+@font-face {
+    font-display: swap;
+    font-family: 'Montserrat';
+    font-style: normal;
+    font-weight: 400;
+    src: url('../fonts/montserrat-v26-latin-regular.woff2') format('woff2');
+}
+
+/* montserrat-600 - latin */
+@font-face {
+    font-display: swap;
+    font-family: 'Montserrat';
+    font-style: normal;
+    font-weight: 600;
+    src: url('../fonts/montserrat-v26-latin-600.woff2') format('woff2');
+}
+
+/* lora-regular - latin */
+@font-face {
+    font-display: swap;
+    font-family: 'Lora';
+    font-style: normal;
+    font-weight: 400;
+    src: url('../fonts/lora-v35-latin-regular.woff2') format('woff2');
+}
diff --git a/assets/scss/split.scss b/assets/scss/split.scss
index b59366c..d4f3d8e 100644
--- a/assets/scss/split.scss
+++ b/assets/scss/split.scss
@@ -28,4 +28,5 @@
 //-------------------------------------------------------------------------------
 
 @import "reset";
+@import "fonts";
 @import "content";
diff --git a/static/fonts/lora-v35-latin-regular.woff2 b/static/fonts/lora-v35-latin-regular.woff2
new file mode 100644
index 0000000..818ef10
--- /dev/null
+++ b/static/fonts/lora-v35-latin-regular.woff2
Binary files differ
diff --git a/static/fonts/montserrat-v26-latin-600.woff2 b/static/fonts/montserrat-v26-latin-600.woff2
new file mode 100644
index 0000000..a0bfc7b
--- /dev/null
+++ b/static/fonts/montserrat-v26-latin-600.woff2
Binary files differ
diff --git a/static/fonts/montserrat-v26-latin-regular.woff2 b/static/fonts/montserrat-v26-latin-regular.woff2
new file mode 100644
index 0000000..f4b26df
--- /dev/null
+++ b/static/fonts/montserrat-v26-latin-regular.woff2
Binary files differ
diff --git a/tests/exampleSiteWithImage/budget.desktop.json b/tests/exampleSiteWithImage/budget.desktop.json
index 06bc6a5..7386c56 100644
--- a/tests/exampleSiteWithImage/budget.desktop.json
+++ b/tests/exampleSiteWithImage/budget.desktop.json
@@ -1,18 +1,18 @@
 {
     "budget": {
         "requests": {
-            "total": 9
+            "total": 8
         },
         "transferSize": {
             "total": 324608
         },
         "thirdParty": {
-            "requests": 5
+            "requests": 1
         },
         "score": {
             "bestpractice": 93,
-            "privacy": 84,
-            "performance": 86
+            "privacy": 89,
+            "performance": 81
         }
     }
 }
diff --git a/tests/exampleSiteWithImage/budget.mobile.json b/tests/exampleSiteWithImage/budget.mobile.json
index 06bc6a5..7386c56 100644
--- a/tests/exampleSiteWithImage/budget.mobile.json
+++ b/tests/exampleSiteWithImage/budget.mobile.json
@@ -1,18 +1,18 @@
 {
     "budget": {
         "requests": {
-            "total": 9
+            "total": 8
         },
         "transferSize": {
             "total": 324608
         },
         "thirdParty": {
-            "requests": 5
+            "requests": 1
         },
         "score": {
             "bestpractice": 93,
-            "privacy": 84,
-            "performance": 86
+            "privacy": 89,
+            "performance": 81
         }
     }
 }
diff --git a/tests/exampleSiteWithVideo/budget.desktop.json b/tests/exampleSiteWithVideo/budget.desktop.json
index 433638a..054cac0 100644
--- a/tests/exampleSiteWithVideo/budget.desktop.json
+++ b/tests/exampleSiteWithVideo/budget.desktop.json
@@ -1,18 +1,18 @@
 {
     "budget": {
         "requests": {
-            "total": 9
+            "total": 8
         },
         "transferSize": {
             "total": 2048000
         },
         "thirdParty": {
-            "requests": 5
+            "requests": 1
         },
         "score": {
             "bestpractice": 93,
-            "privacy": 84,
-            "performance": 84
+            "privacy": 89,
+            "performance": 79
         }
     }
 }
diff --git a/tests/exampleSiteWithVideo/budget.mobile.json b/tests/exampleSiteWithVideo/budget.mobile.json
index fb624dd..a6b414a 100644
--- a/tests/exampleSiteWithVideo/budget.mobile.json
+++ b/tests/exampleSiteWithVideo/budget.mobile.json
@@ -1,18 +1,18 @@
 {
     "budget": {
         "requests": {
-            "total": 9
+            "total": 8
         },
         "transferSize": {
             "total": 2048000
         },
         "thirdParty": {
-            "requests": 5
+            "requests": 1
         },
         "score": {
             "bestpractice": 93,
-            "privacy": 84,
-            "performance": 82
+            "privacy": 89,
+            "performance": 77
         }
     }
 }

--
Gitblit v1.10.0