From 7b48cf6e91340ad9aba1a9440458b3b4cd0cfebe Mon Sep 17 00:00:00 2001 From: Sped0n Date: Wed, 1 Nov 2023 23:02:37 +0800 Subject: [PATCH] chore(font.scss): update font-face declaration for 'Geist' font and add font-display property for better font loading performance chore(font.scss): add font-face declaration for 'fw' font and set font-display property for better font loading performance chore(typography.scss): update font-family property for body element to use 'Geist' font as the primary font chore(typography.scss): update font-family property for button element to use 'fw' font as the primary font --- assets/scss/_core/_font.scss | 13 ++++++++++--- assets/scss/_core/_typography.scss | 6 +++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/assets/scss/_core/_font.scss b/assets/scss/_core/_font.scss index c049975..d80be00 100644 --- a/assets/scss/_core/_font.scss +++ b/assets/scss/_core/_font.scss @@ -1,6 +1,13 @@ @font-face { - font-family: HelveticaNow; - src: url('/lib/fonts/HelveticaNowText-Regular.woff2') format('woff2'); - font-weight: 400; + font-family: 'Geist'; + src: url('/lib/fonts/GeistVF.woff2') format('woff2'); + font-weight: 90; font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'fw'; + src: url('/lib/fonts/fw.svg') format('svg'); + font-display: swap; } diff --git a/assets/scss/_core/_typography.scss b/assets/scss/_core/_typography.scss index 00d5d55..3988ab4 100644 --- a/assets/scss/_core/_typography.scss +++ b/assets/scss/_core/_typography.scss @@ -3,7 +3,11 @@ body { line-height: 1.2; font-size: 16px; - font-family: HelveticaNow, helvetica, arial, sans-serif; + font-family: 'Geist', helvetica, arial, sans-serif; + + button { + font-family: 'fw', sans-serif; + } @include min-width('tablet') { font-size: 18px;