From bd5d17f723cd20b320ac0ccce1bd01b6defaac38 Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Thu, 14 Dec 2023 13:29:54 +0100 Subject: [PATCH] Add missing fonts --- package.json | 2 ++ src/components/Account/index.module.css | 2 +- src/components/Button/index.module.css | 1 + src/index.css | 15 ++++++++++++++- yarn.lock | 10 ++++++++++ 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a739c55..ebacf1e 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,8 @@ "preview": "vite preview" }, "dependencies": { + "@fontsource-variable/figtree": "^5.0.19", + "@fontsource-variable/roboto-mono": "^5.0.17", "@metamask/detect-provider": "^2.0.0", "@metamask/jazzicon": "^2.0.0", "@oasisprotocol/sapphire-paratime": "^1.1.4", diff --git a/src/components/Account/index.module.css b/src/components/Account/index.module.css index 530576b..3d35f41 100644 --- a/src/components/Account/index.module.css +++ b/src/components/Account/index.module.css @@ -27,7 +27,7 @@ .accountAddress { flex: 1 0 65%; - font-family: monospace; + font-family: 'Roboto Mono Variable', monospace; text-decoration: none; font-size: 22px; font-weight: 700; diff --git a/src/components/Button/index.module.css b/src/components/Button/index.module.css index 19f0f75..6955d57 100644 --- a/src/components/Button/index.module.css +++ b/src/components/Button/index.module.css @@ -3,6 +3,7 @@ border: 1px solid transparent; box-shadow: none; cursor: pointer; + font-family: 'Figtree Variable', 'Helvetica', 'Arial', sans-serif; font-size: 18px; font-style: normal; font-weight: 700; diff --git a/src/index.css b/src/index.css index cc3d6d1..0dac40d 100644 --- a/src/index.css +++ b/src/index.css @@ -1,3 +1,16 @@ +@import '@fontsource-variable/figtree/index.css'; +@import '@fontsource-variable/roboto-mono/index.css'; + +/** Use Figtree for "…" instead of Roboto Mono. */ +@font-face { + font-family: 'Roboto Mono Variable'; + font-style: normal; + font-display: swap; + font-weight: 100 700; + src: url('@fontsource-variable/figtree/files/figtree-latin-wght-normal.woff2') format('woff2'); + unicode-range: U+2026; +} + :root { --white: #fff; --brand-medium: #0092f6; @@ -18,7 +31,7 @@ body { margin: 0; - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + font-family: 'Figtree Variable', 'Helvetica', 'Arial', sans-serif; font-size: 16px; font-style: normal; font-weight: normal; diff --git a/yarn.lock b/yarn.lock index 4af657f..6a5b6ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -496,6 +496,16 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" +"@fontsource-variable/figtree@^5.0.19": + version "5.0.19" + resolved "https://registry.yarnpkg.com/@fontsource-variable/figtree/-/figtree-5.0.19.tgz#143201f4566c4a30dd0262a0901850a72395d992" + integrity sha512-4R7dcsjNJxAhamtOXDlsZgXIPYShzP2sloFFaQXOO9bUHk1thkQWElXzvlinzzI17H59iexUf987m7XTOv/zyQ== + +"@fontsource-variable/roboto-mono@^5.0.17": + version "5.0.17" + resolved "https://registry.yarnpkg.com/@fontsource-variable/roboto-mono/-/roboto-mono-5.0.17.tgz#293d600624b1fc1ca2d811c8bbf78b63b04883fe" + integrity sha512-+FyoiEmO2r/kiwPnsPtATK2ROMgNwCnVSvvs+K38GMLIgLSSk4cNqU3GCqJDMSvAPHMYd0gFPGKStFh+yLqd9Q== + "@humanwhocodes/config-array@^0.11.13": version "0.11.13" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297"