feat: rename --font-cal to --font-heading + use Cal Sans UI (#26064)

* feat: rename --font-cal to --font-heading + use Cal Sans UI

* chore: remove font-weight from font-heading elements and CSS variables

Co-Authored-By: [email protected] <[email protected]>

* chore: remove unneeded css vars

* fix: cubic issues

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Rajiv Sahal <[email protected]>
This commit is contained in:
authored and GitHub committed 2026-01-09 10:42:23 +00:00
1 parent 56b29b5df6
commit c380ea810c
74 files changed
+159 -141

No files matched your search

Binary file not shown.
+49
View File
@@ -0,0 +1,49 @@
# Shared Fonts
This directory contains shared font files and configurations used across all apps in the monorepo.
## Usage
Import fonts directly from the shared UI package:
```tsx
import { fontSans, fontHeading } from "@coss/ui/fonts";
export default function RootLayout({ children }) {
return (
<html lang="en">
<body className={`${fontSans.variable} ${fontHeading.variable}`}>
{children}
</body>
</html>
);
}
```
## Available Fonts
- `fontSans` - Cal Sans UI variable font (supports multiple weights and modes)
- `fontHeading` - Cal Sans Regular font
## Adding New Fonts
1. Place the font file in this directory (`packages/coss-ui/src/fonts/`)
2. Add a new font configuration in `index.ts`:
```typescript
export const yourNewFont = localFont({
display: "swap",
src: "./YourFont.woff2",
variable: "--font-your-name",
});
```
3. Use it in any app by importing from `@coss/ui/fonts`
## Benefits of This Approach
- Single source of truth for fonts
- No fragile relative paths
- Type-safe imports
- Versioned with the UI package
- Easy to update across all apps
+13
View File
@@ -0,0 +1,13 @@
import localFont from "next/font/local";
export const fontSans = localFont({
display: "swap",
src: "./CalSansUI[MODE,wght].woff2",
variable: "--font-sans",
});
export const fontHeading = localFont({
display: "swap",
src: "./CalSans-SemiBold.woff2",
variable: "--font-heading",
});