summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/components/fonts.tsx
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-10-16 14:53:44 -0500
committerAdam <[email protected]>2025-10-16 14:53:44 -0500
commit47d9e017657c4d265dea53bd86d727097a7ba282 (patch)
treee278fb3983f13f6fa474228cf5031c3b4680f566 /packages/ui/src/components/fonts.tsx
parentfc18fc8a08e703a54553e714344e638673b2d313 (diff)
downloadopencode-47d9e017657c4d265dea53bd86d727097a7ba282.tar.gz
opencode-47d9e017657c4d265dea53bd86d727097a7ba282.zip
wip: css/ui and desktop work
Diffstat (limited to 'packages/ui/src/components/fonts.tsx')
-rw-r--r--packages/ui/src/components/fonts.tsx44
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/ui/src/components/fonts.tsx b/packages/ui/src/components/fonts.tsx
new file mode 100644
index 000000000..447c486e4
--- /dev/null
+++ b/packages/ui/src/components/fonts.tsx
@@ -0,0 +1,44 @@
+import { Style, Link } from "@solidjs/meta"
+import geist from "@opencode-ai/css/fonts/geist.woff2"
+import geistMono from "@opencode-ai/css/fonts/geist-mono.woff2"
+
+export const Fonts = () => {
+ return (
+ <>
+ <Style>{`
+ @font-face {
+ font-family: "geist";
+ src: url("${geist}") format("woff2-variations");
+ font-display: swap;
+ font-style: normal;
+ font-weight: 100 900;
+ }
+ @font-face {
+ font-family: "geist-fallback";
+ src: local("Arial");
+ size-adjust: 100%;
+ ascent-override: 97%;
+ descent-override: 25%;
+ line-gap-override: 1%;
+ }
+ @font-face {
+ font-family: "geist-mono";
+ src: url("${geistMono}") format("woff2-variations");
+ font-display: swap;
+ font-style: normal;
+ font-weight: 100 900;
+ }
+ @font-face {
+ font-family: "geist-mono-fallback";
+ src: local("Courier New");
+ size-adjust: 100%;
+ ascent-override: 97%;
+ descent-override: 25%;
+ line-gap-override: 1%;
+ }
+ `}</Style>
+ <Link rel="preload" href={geist} as="font" type="font/woff2" crossorigin="anonymous" />
+ <Link rel="preload" href={geistMono} as="font" type="font/woff2" crossorigin="anonymous" />
+ </>
+ )
+}