style: enforce Vazirmatn font with tabular figures across all numbers and metrics

This commit is contained in:
alireza 2026-08-26 14:34:03 +03:30
parent e358c4ded7
commit d5dffd0980
4 changed files with 20 additions and 3 deletions

View File

@ -65,6 +65,7 @@
"three": "^0.167.1",
"tw-animate-css": "^1.3.4",
"vaul": "^1.1.2",
"vazirmatn": "^33.0.3",
"vite-tsconfig-paths": "^6.0.2",
"zod": "^3.24.2"
},
@ -8707,6 +8708,12 @@
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc"
}
},
"node_modules/vazirmatn": {
"version": "33.0.3",
"resolved": "https://registry.npmjs.org/vazirmatn/-/vazirmatn-33.0.3.tgz",
"integrity": "sha512-fbjNc0CMjazZpIegWzz9OHGzI1APFboT+x7ZecXlUCtDe/nkyx7gtCTZnWS/+eeXG7fbfXymCPKJI8EsnM3iqw==",
"license": "OFL"
},
"node_modules/victory-vendor": {
"version": "36.9.2",
"resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-36.9.2.tgz",

View File

@ -72,6 +72,7 @@
"three": "^0.167.1",
"tw-animate-css": "^1.3.4",
"vaul": "^1.1.2",
"vazirmatn": "^33.0.3",
"vite-tsconfig-paths": "^6.0.2",
"zod": "^3.24.2"
},

View File

@ -101,7 +101,7 @@ export const Route = createRootRouteWithContext<{ queryClient: QueryClient }>()(
{ rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" },
{
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap",
href: "https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap",
},
],
}),

View File

@ -1,3 +1,4 @@
@import "vazirmatn/Vazirmatn-font-face.css";
@import "tailwindcss" source(none);
@source "../src";
@import "tw-animate-css";
@ -257,7 +258,7 @@
--color-chart-4: var(--chart-4);
--color-chart-5: var(--chart-5);
--font-sans: Vazirmatn, system-ui, sans-serif;
--font-mono: "JetBrains Mono", ui-monospace, monospace;
--font-mono: Vazirmatn, system-ui, sans-serif;
}
:root {
@ -311,5 +312,13 @@
color: var(--color-foreground);
direction: rtl;
}
.font-mono { font-family: var(--font-mono); }
/* Enforce Vazirmatn for all numbers, tabular-nums, and monospace elements */
.font-mono,
.tabular-nums,
span.font-mono,
div.font-mono {
font-family: Vazirmatn, system-ui, sans-serif !important;
font-feature-settings: "tnum" 1;
font-variant-numeric: tabular-nums;
}
}