From 2d8505a538f579f808081a5fa9a00329b6f3ac03 Mon Sep 17 00:00:00 2001 From: Felix Nie Date: Mon, 17 Mar 2025 17:22:08 +0800 Subject: [PATCH] Refined font inclusion logic --- quartz/util/theme.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/util/theme.ts b/quartz/util/theme.ts index daa4f2341..534625161 100644 --- a/quartz/util/theme.ts +++ b/quartz/util/theme.ts @@ -95,7 +95,7 @@ export function googleFontHref(theme: Theme, text: string): string[] { `https://fonts.googleapis.com/css2?family=${headerFont}&family=${bodyFont}&family=${codeFont}&display=swap`, ] - if (titleFont !== headerFont) { + if (titleFont !== headerFont && titleFont !== bodyFont && titleFont !== codeFont) { hrefs.push(`https://fonts.googleapis.com/css2?family=${titleFont}&text=${encodeURIComponent(text)}&display=swap`) }