From f0e7878cd54ddc5344ea483b42efcfdd78457907 Mon Sep 17 00:00:00 2001
From: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Date: Tue, 2 Apr 2024 09:52:53 -0500
Subject: [PATCH] Replace Google Fonts download URL with Fontsource

This stopped working recently; we can just download it from an actual
API designed for this instead, which should be safer.

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
---
 tests/host-integration.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/host-integration.sh b/tests/host-integration.sh
index e2e5546..2f0f349 100644
--- a/tests/host-integration.sh
+++ b/tests/host-integration.sh
@@ -19,15 +19,15 @@ test-no-extra-locales-included() {
 }
 
 test-fontconfig-dirs() {
-  curl -Lo cousine.zip https://fonts.google.com/download?family=Cousine
+  curl -Lo cousine.zip https://api.fontsource.org/v1/download/cousine
 
   rm -rf "$DATA_HOME/fonts"
   mkdir "$DATA_HOME/fonts"
   # Run bsdtar in the runtime so that we don't need unzip on the host system.
   flatpak-run-in --filesystem="$DATA_HOME/fonts" --filesystem="$PWD" "$APP" \
-    bsdtar -C "$DATA_HOME/fonts" -xf cousine.zip
+    bsdtar -C "$DATA_HOME/fonts" -xf cousine.zip --strip-components=1 'ttf/*'
 
   flatpak-run-in "$APP" fc-cache -fv
-  match-any-lines '/run/host/user-fonts/Cousine' \
+  match-any-lines '/run/host/user-fonts/cousine' \
     flatpak-run-in "$APP" fc-list
 }
-- 
GitLab