Preload Lexend fonts

This commit is contained in:
Helen Chong 2024-07-25 21:10:35 +08:00
parent f4fe4764a8
commit bfdc609239
2 changed files with 25 additions and 21 deletions

View File

@ -22,6 +22,31 @@
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.chyrp_url }}/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.chyrp_url }}/favicon/favicon-16x16.png">
<link rel="manifest" href="{{ site.chyrp_url }}/favicon/site.webmanifest">
<link rel="preload" href="../../../fonts/lexend-v19-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../../../fonts/lexend-v19-latin-700.woff2" as="font" type="font/woff2" crossorigin>
<style>
@font-face {
font-display: swap;
font-family: 'Lexend';
font-style: normal;
font-weight: 400;
src: url('../../../fonts/lexend-v19-latin-regular.woff2') format('woff2');
}
@font-face {
font-display: swap;
font-family: 'Lexend';
font-style: normal;
font-weight: 600;
src: url('../../../fonts/lexend-v19-latin-600.woff2') format('woff2');
}
@font-face {
font-display: swap;
font-family: 'Lexend';
font-style: normal;
font-weight: 700;
src: url('../../../fonts/lexend-v19-latin-700.woff2') format('woff2');
}
</style>
{{ theme.feeds() }}
{{ theme.stylesheets() }}
{{ theme.javascripts() }}

View File

@ -1,24 +1,3 @@
@font-face {
font-display: swap;
font-family: 'Lexend';
font-style: normal;
font-weight: 400;
src: url('../../../fonts/lexend-v19-latin-regular.woff2') format('woff2');
}
@font-face {
font-display: swap;
font-family: 'Lexend';
font-style: normal;
font-weight: 600;
src: url('../../../fonts/lexend-v19-latin-600.woff2') format('woff2');
}
@font-face {
font-display: swap;
font-family: 'Lexend';
font-style: normal;
font-weight: 700;
src: url('../../../fonts/lexend-v19-latin-700.woff2') format('woff2');
}
html {
font-size: 16px;
}