1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 16:25:31 -04:00

font preloading logic

This commit is contained in:
2022-05-27 12:36:58 -04:00
parent 090842a3bb
commit 804e88b7f9
6 changed files with 77 additions and 37 deletions

View File

@@ -23,7 +23,13 @@ export const name = {
variable: "Roboto Mono var",
};
// re-export hashed URL(s) of the most prominent file so we can preload it in head:
export const preloadUrls = [robotoMonoLatinVarWghtOnlyNormalWoff2];
export const preloadFonts = [
{
key: "roboto-mono-var",
src: robotoMonoLatinVarWghtOnlyNormalWoff2,
type: "font/woff2",
},
];
export const family: AtRule.FontFace[] = [
{
fontFamily: name.regular,