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:
@@ -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',
|
||||
});
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user