Replace Vazirmatn with a locally-served Peyda font for Persian text.

Vendor the Peyda woff weights (Thin–Black) under public/fonts/peyda and
load them via next/font/local in a shared fonts module, exposed through
the --font-peyda CSS variable and the font-peyda Tailwind utility. Drops
the runtime Google Fonts fetch on the landing and auth pages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
keyhan
2026-06-11 10:33:33 +03:30
parent 25b81e4277
commit 2b16846f67
14 changed files with 41 additions and 13 deletions
+18
View File
@@ -0,0 +1,18 @@
import localFont from 'next/font/local';
// Peyda — Persian/Arabic typeface served locally from public/fonts/peyda.
export const peyda = localFont({
src: [
{ path: '../../public/fonts/peyda/Peyda-Thin.woff', weight: '100', style: 'normal' },
{ path: '../../public/fonts/peyda/Peyda-ExtraLight.woff', weight: '200', style: 'normal' },
{ path: '../../public/fonts/peyda/Peyda-Light.woff', weight: '300', style: 'normal' },
{ path: '../../public/fonts/peyda/Peyda-Regular.woff', weight: '400', style: 'normal' },
{ path: '../../public/fonts/peyda/Peyda-Medium.woff', weight: '500', style: 'normal' },
{ path: '../../public/fonts/peyda/Peyda-SemiBold.woff', weight: '600', style: 'normal' },
{ path: '../../public/fonts/peyda/Peyda-Bold.woff', weight: '700', style: 'normal' },
{ path: '../../public/fonts/peyda/Peyda-ExtraBold.woff', weight: '800', style: 'normal' },
{ path: '../../public/fonts/peyda/Peyda-Black.woff', weight: '900', style: 'normal' },
],
variable: '--font-peyda',
display: 'swap',
});
+2 -8
View File
@@ -1,13 +1,7 @@
import type { Metadata } from 'next';
import { Vazirmatn } from 'next/font/google';
import { peyda } from './fonts';
import { LandingPage } from '@/components/landing/LandingPage';
const vazir = Vazirmatn({
subsets: ['arabic'],
variable: '--font-vazir',
display: 'swap',
});
export const metadata: Metadata = {
title: 'ابربان | زیرساخت ابری، در کنترل تو',
description:
@@ -16,7 +10,7 @@ export const metadata: Metadata = {
export default function Home() {
return (
<div dir="rtl" className={`${vazir.variable} font-vazir`}>
<div dir="rtl" className={`${peyda.variable} font-peyda`}>
<LandingPage />
</div>
);
+2 -4
View File
@@ -1,10 +1,8 @@
import type { ReactNode } from 'react';
import { Vazirmatn } from 'next/font/google';
import Link from 'next/link';
import { peyda } from '@/app/fonts';
import { Logo } from '@/components/landing/Logo';
const vazir = Vazirmatn({ subsets: ['arabic'], variable: '--font-vazir', display: 'swap' });
// Cinematic auth shell that echoes the Abrban landing: a calm blue sky (the
// "clear sky" finale), soft drifting clouds, a warm sun glow, the brand logo,
// and the form inside a frosted dark-glass panel. Persian / RTL.
@@ -28,7 +26,7 @@ export function AuthShell({
return (
<div
dir="rtl"
className={`${vazir.variable} font-vazir relative min-h-screen w-full overflow-hidden bg-gradient-to-b from-[#1b6fd0] via-[#589add] to-[#cfe6f7] text-white`}
className={`${peyda.variable} font-peyda relative min-h-screen w-full overflow-hidden bg-gradient-to-b from-[#1b6fd0] via-[#589add] to-[#cfe6f7] text-white`}
>
{/* Sky atmosphere: warm sun glow, drifting clouds, soft vignette */}
<div className="pointer-events-none absolute inset-0 overflow-hidden">