FarsiUI
لطیف

Lateef

منبع
وزن

نصب

روش نصب را انتخاب کنید

فونت را با next/font/google لود کنید؛ variable برای توکن CSS و className برای اعمال فوری روی کل صفحه.

app/layout.tsx
import { Lateef } from "next/font/google"

const lateef = Lateef({
  subsets: ["arabic"],
  weight: ["400","700"],
  variable: "--font-lateef",
  display: "swap",
})

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html
      lang="fa"
      dir="rtl"
      className={`${lateef.variable} ${lateef.className}`}
    >
      <body className="antialiased">{children}</body>
    </html>
  )
}

اختیاری — اگر className روی html کافی است رد شوید. در غیر این صورت برای توکن Tailwind از @theme و بدون Tailwind از body استفاده کنید.

app/globals.css
@theme inline {
  --font-sans: var(--font-lateef), ui-sans-serif, system-ui, sans-serif;
}

body {
  font-family: var(--font-lateef), ui-sans-serif, system-ui, sans-serif;
}