From d398b93c6a7742fd66b4db9f0fa8d10805df0578 Mon Sep 17 00:00:00 2001 From: axolotle Date: Mon, 4 Mar 2024 16:43:14 +0100 Subject: [PATCH] refactor: upgrade fonts --- app/package.json | 4 +- app/src/scss/font.scss | 147 ++++++++++++++++++++++++++++++++--------- 2 files changed, 119 insertions(+), 32 deletions(-) diff --git a/app/package.json b/app/package.json index 070941e5..39c9c1de 100644 --- a/app/package.json +++ b/app/package.json @@ -13,8 +13,8 @@ "lintfix": "prettier --write --list-different . && yarn lint:js --fix" }, "dependencies": { - "@fontsource/fira-code": "^4.5.13", - "@fontsource/firago": "^4.5.3", + "@fontsource/fira-code": "^5.0.17", + "@fontsource/firago": "^5.0.7", "@vue/compat": "3.3.4", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", diff --git a/app/src/scss/font.scss b/app/src/scss/font.scss index bcc4f427..40182877 100644 --- a/app/src/scss/font.scss +++ b/app/src/scss/font.scss @@ -6,90 +6,98 @@ ╰─────────────────────────╯ */ -/* firago-all-300-italic*/ +/* firago-latin-300-italic*/ @font-face { font-family: 'FiraGO'; src: local('FiraGO ExtraLight Italic'), - url('~@fontsource/firago/files/firago-all-200-italic.woff2') format('woff2'), - url('~@fontsource/firago/files/firago-all-200-italic.woff') format('woff'); + url('~@fontsource/firago/files/firago-latin-200-italic.woff2') + format('woff2'), + url('~@fontsource/firago/files/firago-latin-200-italic.woff') format('woff'); font-weight: 200; font-style: italic; font-display: swap; } -/* firago-all-300-normal*/ +/* firago-latin-300-normal*/ @font-face { font-family: 'FiraGO'; src: local('FiraGO ExtraLight'), - url('~@fontsource/firago/files/firago-all-200-normal.woff2') format('woff2'), - url('~@fontsource/firago/files/firago-all-200-normal.woff') format('woff'); + url('~@fontsource/firago/files/firago-latin-200-normal.woff2') + format('woff2'), + url('~@fontsource/firago/files/firago-latin-200-normal.woff') format('woff'); font-weight: 200; font-style: normal; font-display: swap; } -/* firago-all-400-italic*/ +/* firago-latin-400-italic*/ @font-face { font-family: 'FiraGO'; src: local('FiraGO Italic'), - url('~@fontsource/firago/files/firago-all-400-italic.woff2') format('woff2'), - url('~@fontsource/firago/files/firago-all-400-italic.woff') format('woff'); + url('~@fontsource/firago/files/firago-latin-400-italic.woff2') + format('woff2'), + url('~@fontsource/firago/files/firago-latin-400-italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; } -/* firago-all-400-normal*/ +/* firago-latin-400-normal*/ @font-face { font-family: 'FiraGO'; src: local('FiraGO Regular'), - url('~@fontsource/firago/files/firago-all-400-normal.woff2') format('woff2'), - url('~@fontsource/firago/files/firago-all-400-normal.woff') format('woff'); + url('~@fontsource/firago/files/firago-latin-400-normal.woff2') + format('woff2'), + url('~@fontsource/firago/files/firago-latin-400-normal.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; } -/* firago-all-500-italic*/ +/* firago-latin-500-italic*/ @font-face { font-family: 'FiraGO'; src: local('FiraGO Medium Italic'), - url('~@fontsource/firago/files/firago-all-500-italic.woff2') format('woff2'), - url('~@fontsource/firago/files/firago-all-500-italic.woff') format('woff'); + url('~@fontsource/firago/files/firago-latin-500-italic.woff2') + format('woff2'), + url('~@fontsource/firago/files/firago-latin-500-italic.woff') format('woff'); font-weight: 500; font-style: italic; font-display: swap; } -/* firago-all-500-normal*/ +/* firago-latin-500-normal*/ @font-face { font-family: 'FiraGO'; src: local('FiraGO Medium'), - url('~@fontsource/firago/files/firago-all-500-normal.woff2') format('woff2'), - url('~@fontsource/firago/files/firago-all-500-normal.woff') format('woff'); + url('~@fontsource/firago/files/firago-latin-500-normal.woff2') + format('woff2'), + url('~@fontsource/firago/files/firago-latin-500-normal.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; } -/* firago-all-700-italic*/ +/* firago-latin-700-italic*/ @font-face { font-family: 'FiraGO'; src: local('FiraGO Bold Italic'), - url('~@fontsource/firago/files/firago-all-700-italic.woff2') format('woff2'), - url('~@fontsource/firago/files/firago-all-700-italic.woff') format('woff'); + url('~@fontsource/firago/files/firago-latin-700-italic.woff2') + format('woff2'), + url('~@fontsource/firago/files/firago-latin-700-italic.woff') format('woff'); font-weight: 700; font-style: italic; font-display: swap; } -/* firago-all-700-normal*/ +/* firago-latin-700-normal*/ @font-face { font-family: 'FiraGO'; src: local('FiraGO Bold'), - url('~@fontsource/firago/files/firago-all-700-normal.woff2') format('woff2'), - url('~@fontsource/firago/files/firago-all-700-normal.woff') format('woff'); + url('~@fontsource/firago/files/firago-latin-700-normal.woff2') + format('woff2'), + url('~@fontsource/firago/files/firago-latin-700-normal.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; @@ -103,13 +111,92 @@ ╰───────────────────────────────╯ */ +/* fira-code-cyrillic-ext-400-normal */ @font-face { font-family: 'Fira Code'; - src: - local('Fira Code Regular'), - // url('~@fontsource/fira-code/files/fira-code-all-400-normal.woff2') format('woff2'), - url('~@fontsource/fira-code/files/fira-code-all-400-normal.woff') - format('woff'); - font-weight: 400; font-style: normal; + font-display: swap; + font-weight: 400; + src: + url('~@fontsource/fira-code/files/fira-code-cyrillic-ext-400-normal.woff2') + format('woff2'), + url('~@fontsource/fira-code/files/fira-code-cyrillic-ext-400-normal.woff') + format('woff'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, + U+FE2E-FE2F; +} + +/* fira-code-cyrillic-400-normal */ +@font-face { + font-family: 'Fira Code'; + font-style: normal; + font-display: swap; + font-weight: 400; + src: + url('~@fontsource/fira-code/files/fira-code-cyrillic-400-normal.woff2') + format('woff2'), + url('~@fontsource/fira-code/files/fira-code-cyrillic-400-normal.woff') + format('woff'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +/* fira-code-greek-ext-400-normal */ +@font-face { + font-family: 'Fira Code'; + font-style: normal; + font-display: swap; + font-weight: 400; + src: + url('~@fontsource/fira-code/files/fira-code-greek-ext-400-normal.woff2') + format('woff2'), + url('~@fontsource/fira-code/files/fira-code-greek-ext-400-normal.woff') + format('woff'); + unicode-range: U+1F00-1FFF; +} + +/* fira-code-greek-400-normal */ +@font-face { + font-family: 'Fira Code'; + font-style: normal; + font-display: swap; + font-weight: 400; + src: + url('~@fontsource/fira-code/files/fira-code-greek-400-normal.woff2') + format('woff2'), + url('~@fontsource/fira-code/files/fira-code-greek-400-normal.woff') + format('woff'); + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, + U+03A3-03FF; +} + +/* fira-code-latin-ext-400-normal */ +@font-face { + font-family: 'Fira Code'; + font-style: normal; + font-display: swap; + font-weight: 400; + src: + url('~@fontsource/fira-code/files/fira-code-latin-ext-400-normal.woff2') + format('woff2'), + url('~@fontsource/fira-code/files/fira-code-latin-ext-400-normal.woff') + format('woff'); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* fira-code-latin-400-normal */ +@font-face { + font-family: 'Fira Code'; + font-style: normal; + font-display: swap; + font-weight: 400; + src: + // local('Fira Code Regular'), + url('~@fontsource/fira-code/files/fira-code-latin-400-normal.woff2') + format('woff2'), + url('~@fontsource/fira-code/files/fira-code-latin-400-normal.woff') + format('woff'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }