diff --git a/package.json b/package.json index f51caa8d..7c18352b 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "@babel/preset-react": "^7.22.15", "@babel/preset-typescript": "^7.23.0", "@codecov/vite-plugin": "^1.3.0", + "@fontsource/inconsolata": "^5.1.0", + "@fontsource/inter": "^5.1.0", "@formatjs/intl-durationformat": "^0.6.1", "@formatjs/intl-segmenter": "^11.7.3", "@livekit/components-core": "^0.11.0", diff --git a/public/fonts/Inter/Inter-Bold.woff b/public/fonts/Inter/Inter-Bold.woff deleted file mode 100644 index 2ec7ac3d..00000000 Binary files a/public/fonts/Inter/Inter-Bold.woff and /dev/null differ diff --git a/public/fonts/Inter/Inter-Bold.woff2 b/public/fonts/Inter/Inter-Bold.woff2 deleted file mode 100644 index 6989c992..00000000 Binary files a/public/fonts/Inter/Inter-Bold.woff2 and /dev/null differ diff --git a/public/fonts/Inter/Inter-BoldItalic.woff b/public/fonts/Inter/Inter-BoldItalic.woff deleted file mode 100644 index aa35b797..00000000 Binary files a/public/fonts/Inter/Inter-BoldItalic.woff and /dev/null differ diff --git a/public/fonts/Inter/Inter-BoldItalic.woff2 b/public/fonts/Inter/Inter-BoldItalic.woff2 deleted file mode 100644 index 18b4c1ce..00000000 Binary files a/public/fonts/Inter/Inter-BoldItalic.woff2 and /dev/null differ diff --git a/public/fonts/Inter/Inter-Italic.woff b/public/fonts/Inter/Inter-Italic.woff deleted file mode 100644 index 4b765bd5..00000000 Binary files a/public/fonts/Inter/Inter-Italic.woff and /dev/null differ diff --git a/public/fonts/Inter/Inter-Italic.woff2 b/public/fonts/Inter/Inter-Italic.woff2 deleted file mode 100644 index bd5f255a..00000000 Binary files a/public/fonts/Inter/Inter-Italic.woff2 and /dev/null differ diff --git a/public/fonts/Inter/Inter-Medium.woff b/public/fonts/Inter/Inter-Medium.woff deleted file mode 100644 index 7d55f34c..00000000 Binary files a/public/fonts/Inter/Inter-Medium.woff and /dev/null differ diff --git a/public/fonts/Inter/Inter-Medium.woff2 b/public/fonts/Inter/Inter-Medium.woff2 deleted file mode 100644 index a916b47f..00000000 Binary files a/public/fonts/Inter/Inter-Medium.woff2 and /dev/null differ diff --git a/public/fonts/Inter/Inter-MediumItalic.woff b/public/fonts/Inter/Inter-MediumItalic.woff deleted file mode 100644 index 422ab057..00000000 Binary files a/public/fonts/Inter/Inter-MediumItalic.woff and /dev/null differ diff --git a/public/fonts/Inter/Inter-MediumItalic.woff2 b/public/fonts/Inter/Inter-MediumItalic.woff2 deleted file mode 100644 index f623924a..00000000 Binary files a/public/fonts/Inter/Inter-MediumItalic.woff2 and /dev/null differ diff --git a/public/fonts/Inter/Inter-Regular.woff b/public/fonts/Inter/Inter-Regular.woff deleted file mode 100644 index 7ff51b7d..00000000 Binary files a/public/fonts/Inter/Inter-Regular.woff and /dev/null differ diff --git a/public/fonts/Inter/Inter-Regular.woff2 b/public/fonts/Inter/Inter-Regular.woff2 deleted file mode 100644 index 554aed66..00000000 Binary files a/public/fonts/Inter/Inter-Regular.woff2 and /dev/null differ diff --git a/public/fonts/Inter/Inter-SemiBold.woff b/public/fonts/Inter/Inter-SemiBold.woff deleted file mode 100644 index 76e507a5..00000000 Binary files a/public/fonts/Inter/Inter-SemiBold.woff and /dev/null differ diff --git a/public/fonts/Inter/Inter-SemiBold.woff2 b/public/fonts/Inter/Inter-SemiBold.woff2 deleted file mode 100644 index 93079989..00000000 Binary files a/public/fonts/Inter/Inter-SemiBold.woff2 and /dev/null differ diff --git a/public/fonts/Inter/Inter-SemiBoldItalic.woff b/public/fonts/Inter/Inter-SemiBoldItalic.woff deleted file mode 100644 index 38218121..00000000 Binary files a/public/fonts/Inter/Inter-SemiBoldItalic.woff and /dev/null differ diff --git a/public/fonts/Inter/Inter-SemiBoldItalic.woff2 b/public/fonts/Inter/Inter-SemiBoldItalic.woff2 deleted file mode 100644 index f19f5505..00000000 Binary files a/public/fonts/Inter/Inter-SemiBoldItalic.woff2 and /dev/null differ diff --git a/src/index.css b/src/index.css index 02f335f9..bf6d1605 100644 --- a/src/index.css +++ b/src/index.css @@ -5,14 +5,15 @@ SPDX-License-Identifier: AGPL-3.0-only Please see LICENSE in the repository root for full details. */ -/* Inter unexpectedly contains various codepoints which collide with emoji, even - when variation-16 is applied to request the emoji variant. From eyeballing - the emoji picker, these are: 20e3, 23cf, 24c2, 25a0-25c1, 2665, 2764, 2b06, 2b1c. - Therefore we define a unicode-range to load which excludes the glyphs - (to avoid having to maintain a fork of Inter). */ - @layer normalize, compound-legacy, compound; +@import url("@fontsource/inter/400.css"); +@import url("@fontsource/inter/500.css"); +@import url("@fontsource/inter/600.css"); +@import url("@fontsource/inter/700.css"); +@import url("@fontsource/inconsolata/400.css"); +@import url("@fontsource/inconsolata/700.css"); + @import url("normalize.css/normalize.css") layer(normalize); @import url("@vector-im/compound-design-tokens/assets/web/css/compound-design-tokens.css") layer(compound); @@ -52,94 +53,6 @@ layer(compound); --stopgap-background-85: rgba(16, 19, 23, 0.85); } -@font-face { - font-family: "Inter"; - font-style: normal; - font-weight: 400; - font-display: swap; - unicode-range: var(--inter-unicode-range); - src: - url("/fonts/Inter/Inter-Regular.woff2") format("woff2"), - url("/fonts/Inter/Inter-Regular.woff") format("woff"); -} - -@font-face { - font-family: "Inter"; - font-style: italic; - font-weight: 400; - font-display: swap; - unicode-range: var(--inter-unicode-range); - src: - url("/fonts/Inter/Inter-Italic.woff2") format("woff2"), - url("/fonts/Inter/Inter-Italic.woff") format("woff"); -} - -@font-face { - font-family: "Inter"; - font-style: normal; - font-weight: 500; - font-display: swap; - unicode-range: var(--inter-unicode-range); - src: - url("/fonts/Inter/Inter-Medium.woff2") format("woff2"), - url("/fonts/Inter/Inter-Medium.woff") format("woff"); -} - -@font-face { - font-family: "Inter"; - font-style: italic; - font-weight: 500; - font-display: swap; - unicode-range: var(--inter-unicode-range); - src: - url("/fonts/Inter/Inter-MediumItalic.woff2") format("woff2"), - url("/fonts/Inter/Inter-MediumItalic.woff") format("woff"); -} - -@font-face { - font-family: "Inter"; - font-style: normal; - font-weight: 600; - font-display: swap; - unicode-range: var(--inter-unicode-range); - src: - url("/fonts/Inter/Inter-SemiBold.woff2") format("woff2"), - url("/fonts/Inter/Inter-SemiBold.woff") format("woff"); -} - -@font-face { - font-family: "Inter"; - font-style: italic; - font-weight: 600; - font-display: swap; - unicode-range: var(--inter-unicode-range); - src: - url("/fonts/Inter/Inter-SemiBoldItalic.woff2") format("woff2"), - url("/fonts/Inter/Inter-SemiBoldItalic.woff") format("woff"); -} - -@font-face { - font-family: "Inter"; - font-style: normal; - font-weight: 700; - font-display: swap; - unicode-range: var(--inter-unicode-range); - src: - url("/fonts/Inter/Inter-Bold.woff2") format("woff2"), - url("/fonts/Inter/Inter-Bold.woff") format("woff"); -} - -@font-face { - font-family: "Inter"; - font-style: italic; - font-weight: 700; - font-display: swap; - unicode-range: var(--inter-unicode-range); - src: - url("/fonts/Inter/Inter-BoldItalic.woff2") format("woff2"), - url("/fonts/Inter/Inter-BoldItalic.woff") format("woff"); -} - body { background-color: var(--cpd-color-bg-canvas-default); background-size: calc(max(1440px, 100vw)) calc(max(800px, 100vh)); @@ -185,10 +98,6 @@ body[data-platform="ios"] { --cpd-font-family-sans: -apple-system, BlinkMacSystemFont, "Inter", sans-serif; } -body[data-platform="desktop"] { - --cpd-font-family-sans: "Inter", sans-serif; -} - @layer compound-legacy { h1, h2, diff --git a/yarn.lock b/yarn.lock index e29f2cd9..504bc0eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1657,6 +1657,16 @@ resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.8.tgz#21a907684723bbbaa5f0974cf7730bd797eb8e62" integrity sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig== +"@fontsource/inconsolata@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@fontsource/inconsolata/-/inconsolata-5.1.0.tgz#f6a76680173336d02d2ce4009699821a6be239ce" + integrity sha512-vYPdG3R46MhK+99De8e8MMyNad5BAb1oTnHMpojlctZyWJIcin8bKHFPUpQSNRhZ4HQL/+DCW+RTiG2RbnweTw== + +"@fontsource/inter@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@fontsource/inter/-/inter-5.1.0.tgz#ab629b2c662457022d2d6a29854b8dc8ba538c47" + integrity sha512-zKZR3kf1G0noIes1frLfOHP5EXVVm0M7sV/l9f/AaYf+M/DId35FO4LkigWjqWYjTJZGgplhdv4cB+ssvCqr5A== + "@formatjs/ecma402-abstract@2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-2.2.3.tgz#dc5a032e1971c709b32b9ab511fa35504a7d3bc9"