aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-03 00:07:20 -0800
committerFuwn <[email protected]>2026-02-03 00:07:20 -0800
commit37c82408bed8310e05a1e75b5521d44931991541 (patch)
tree38c59b729227aea0bcdae6dfc432196f42b08cdb
parentperf: Optimise LCP with image loading and animation fixes (diff)
downloaddue.moe-37c82408bed8310e05a1e75b5521d44931991541.tar.xz
due.moe-37c82408bed8310e05a1e75b5521d44931991541.zip
perf(fonts): Move font loading to HTML for faster FCP
-rw-r--r--src/app.html11
-rw-r--r--src/styles/typography.css1
2 files changed, 11 insertions, 1 deletions
diff --git a/src/app.html b/src/app.html
index 2942c457..85f89c52 100644
--- a/src/app.html
+++ b/src/app.html
@@ -56,6 +56,17 @@
<!-- Web Application Manifest -->
<link rel="manifest" href="%sveltekit.assets%/manifest.json" />
+ <!-- Fonts -->
+ <link
+ rel="preload"
+ href="https://proxy.due.moe/?q=https://fonts.googleapis.com/css?family=DM+Sans:400,500,600,700&display=swap"
+ as="style"
+ />
+ <link
+ rel="stylesheet"
+ href="https://proxy.due.moe/?q=https://fonts.googleapis.com/css?family=DM+Sans:400,500,600,700&display=swap"
+ />
+
<!-- Stylesheets -->
<link rel="stylesheet" type="text/css" href="%sveltekit.assets%/styles/LaTeX.css" />
<link rel="stylesheet" type="text/css" href="%sveltekit.assets%/styles/risotto/risotto.css" />
diff --git a/src/styles/typography.css b/src/styles/typography.css
index f33fdc92..e063695e 100644
--- a/src/styles/typography.css
+++ b/src/styles/typography.css
@@ -1,6 +1,5 @@
/* Kosugi, M PLUS 1 Code */
/* @import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;550;700;800&display=swap'); */
-@import url('https://proxy.due.moe/?q=https://fonts.googleapis.com/css?family=DM+Sans:400,500,600,700&display=swap');
body {
font-family: