diff --git a/packages/rsbuild-config/src/lib/config/rsbuild.ts b/packages/rsbuild-config/src/lib/config/rsbuild.ts index d7ade42..5f09975 100644 --- a/packages/rsbuild-config/src/lib/config/rsbuild.ts +++ b/packages/rsbuild-config/src/lib/config/rsbuild.ts @@ -20,12 +20,30 @@ import { pluginDts } from 'rsbuild-plugin-dts'; export function defineServiceConfig(config: RsbuildConfig = {}): RsbuildConfig { return defineConfig({ plugins: [pluginReact(), pluginTypeCheck()], + output: { + distPath: { + font: 'static/font', + }, + filename: { + font: '[name][ext]', + }, + }, html: { template: './src/static/index.html', meta: { description: 'Thoughts and creations of mine', }, tags: [ + { + tag: 'link', + attrs: { + rel: 'preload', + as: 'font', + type: 'font/woff2', + href: '/static/font/lato-var.woff2', + crossorigin: true, + }, + }, { tag: 'style', children: ` diff --git a/packages/ui/src/static/fonts/eb-garamond-var-italic.woff2 b/packages/ui/src/static/fonts/eb-garamond-var-italic.woff2 new file mode 100644 index 0000000..15d7342 Binary files /dev/null and b/packages/ui/src/static/fonts/eb-garamond-var-italic.woff2 differ diff --git a/packages/ui/src/static/fonts/eb-garamond-var.woff2 b/packages/ui/src/static/fonts/eb-garamond-var.woff2 new file mode 100644 index 0000000..b65625c Binary files /dev/null and b/packages/ui/src/static/fonts/eb-garamond-var.woff2 differ diff --git a/packages/ui/src/static/fonts/fira-code-400.woff2 b/packages/ui/src/static/fonts/fira-code-400.woff2 new file mode 100644 index 0000000..383fa3a Binary files /dev/null and b/packages/ui/src/static/fonts/fira-code-400.woff2 differ diff --git a/packages/ui/src/static/fonts/fira-code-500.woff2 b/packages/ui/src/static/fonts/fira-code-500.woff2 new file mode 100644 index 0000000..6012445 Binary files /dev/null and b/packages/ui/src/static/fonts/fira-code-500.woff2 differ diff --git a/packages/ui/src/static/fonts/fira-code-700.woff2 b/packages/ui/src/static/fonts/fira-code-700.woff2 new file mode 100644 index 0000000..a00027e Binary files /dev/null and b/packages/ui/src/static/fonts/fira-code-700.woff2 differ diff --git a/packages/ui/src/static/fonts/fira-code-var.woff2 b/packages/ui/src/static/fonts/fira-code-var.woff2 new file mode 100644 index 0000000..a283a90 --- /dev/null +++ b/packages/ui/src/static/fonts/fira-code-var.woff2 @@ -0,0 +1,1451 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page not found · GitHub · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ Skip to content + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+ + + +
+
+ +
+
+ 404 “This is not the web page you are looking for” + + + + + + + + + + + + +
+
+ +
+
+ +
+ + +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + diff --git a/packages/ui/src/static/fonts/lato-400-italic.woff2 b/packages/ui/src/static/fonts/lato-400-italic.woff2 new file mode 100644 index 0000000..851630f Binary files /dev/null and b/packages/ui/src/static/fonts/lato-400-italic.woff2 differ diff --git a/packages/ui/src/static/fonts/lato-400.woff2 b/packages/ui/src/static/fonts/lato-400.woff2 new file mode 100644 index 0000000..ff60934 Binary files /dev/null and b/packages/ui/src/static/fonts/lato-400.woff2 differ diff --git a/packages/ui/src/static/fonts/lato-700-italic.woff2 b/packages/ui/src/static/fonts/lato-700-italic.woff2 new file mode 100644 index 0000000..38df58b Binary files /dev/null and b/packages/ui/src/static/fonts/lato-700-italic.woff2 differ diff --git a/packages/ui/src/static/fonts/lato-700.woff2 b/packages/ui/src/static/fonts/lato-700.woff2 new file mode 100644 index 0000000..11de83f Binary files /dev/null and b/packages/ui/src/static/fonts/lato-700.woff2 differ diff --git a/packages/ui/src/static/fonts/lato-var-italic.woff2 b/packages/ui/src/static/fonts/lato-var-italic.woff2 new file mode 100644 index 0000000..b3ec1b3 Binary files /dev/null and b/packages/ui/src/static/fonts/lato-var-italic.woff2 differ diff --git a/packages/ui/src/static/fonts/lato-var.woff2 b/packages/ui/src/static/fonts/lato-var.woff2 new file mode 100644 index 0000000..95c63e0 Binary files /dev/null and b/packages/ui/src/static/fonts/lato-var.woff2 differ diff --git a/packages/ui/src/static/styles.css b/packages/ui/src/static/styles.css index 229e871..f7be542 100644 --- a/packages/ui/src/static/styles.css +++ b/packages/ui/src/static/styles.css @@ -1,4 +1,77 @@ -@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Fira+Code:wght@300..700&display=swap'); +/* Lato (Static weights for exact rendering) */ +@font-face { + font-family: 'Lato'; + src: url('./fonts/lato-400.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Lato'; + src: url('./fonts/lato-700.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Lato'; + src: url('./fonts/lato-400-italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Lato'; + src: url('./fonts/lato-700-italic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} + +/* EB Garamond (Full Variable) */ +@font-face { + font-family: 'EB Garamond'; + src: url('./fonts/eb-garamond-var.woff2') format('woff2'); + font-weight: 400 800; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'EB Garamond'; + src: url('./fonts/eb-garamond-var-italic.woff2') format('woff2'); + font-weight: 400 800; + font-style: italic; + font-display: swap; +} + +/* Fira Code (Static weights for exact rendering) */ +@font-face { + font-family: 'Fira Code'; + src: url('./fonts/fira-code-400.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Fira Code'; + src: url('./fonts/fira-code-500.woff2') format('woff2'); + font-weight: 500; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Fira Code'; + src: url('./fonts/fira-code-700.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} @import 'tailwindcss'; @import 'tw-animate-css';