feat: improve font loading
Some checks failed
Build / build (push) Successful in 4m9s
Build / deploy-stage (push) Successful in 2m34s
Build / switch-stage (push) Has been cancelled

This commit is contained in:
2024-12-15 01:51:11 +01:00
parent af66646775
commit da341badd9
2 changed files with 18 additions and 14 deletions

View File

@@ -48,6 +48,19 @@ page {
includeJSFooter {
test_scripts = EXT:base/Resources/Public/JavaScript/main.js
}
# Preload fonts to improve rendering performance
# Ensure fonts exist in the specified directory and consider converting them to WOFF2 for better performance.
headerData {
30 = TEXT
30.value = <link rel="preload" href="EXT:base/Resources/Public/Fonts/Hajime%20Sans.ttf" as="font" type="font/ttf" crossorigin>
40 = TEXT
40.value = <link rel="preload" href="EXT:base/Resources/Public/Fonts/Inter-VariableFont_opsz,wght.ttf" as="font" type="font/ttf" crossorigin>
50 = TEXT
50.value = <link rel="preload" href="EXT:base/Resources/Public/Fonts/Inter-Italic-VariableFont_opsz,wght.ttf" as="font" type="font/ttf" crossorigin>
}
}
lib.contentElement {
@@ -72,4 +85,3 @@ lib.parseFunc_RTE {
}
}
}