import type { Metadata } from "next"; import { DM_Sans, Sarabun } from "next/font/google"; import localFont from "next/font/local"; import "./globals.css"; /* typography audit 2026-09-16 (Option B): Sarabun — ฟอนต์ตระกูลมาตรฐานเอกสาร * ราชการไทย (TH Sarabun) เจ้าหน้าที่คุ้นเคยที่สุด / next/font self-host ตอน build: * ไฟล์ฟอนต์ serve จาก origin เดียวกับแอป ไม่พึ่ง Google ตอนรัน จึงใช้ใน intranet * ได้ (แต่เครื่อง build ต้องเห็นอินเทอร์เน็ต) * * Genesis (docs/DESIGN.md 2026-09-23): เพิ่ม General Sans (display/heading) จาก * Fontshare เป็น variable woff2 ไฟล์เดียว self-host ผ่าน next/font/local + DM Sans * (body) จาก Google — ทั้งคู่เป็น Latin เท่านั้น ไม่มี glyph ไทย จึงวาง Sarabun * ต่อท้ายใน stack (globals.css / tailwind fontFamily): ตัว Latin/ตัวเลขได้บุคลิก * Genesis ส่วนข้อความไทยคง Sarabun เดิม — Sarabun เพิ่ม weight 700 ให้ heading * ไทย (fallback ของ General Sans bold) */ const generalSans = localFont({ src: "./fonts/GeneralSans-Variable.woff2", // ประกาศช่วง wght จริงของ variable font (Fontshare: 200–700) — ไม่ใส่แล้ว // @font-face ที่ next/font generate ไม่มี descriptor font-weight → cover แค่ 400 // และ font-bold/700 กลายเป็น synthetic bold จาก instance 400 (UX review C1 2026-09-23) weight: "200 700", display: "swap", variable: "--font-general-sans", }); const dmSans = DM_Sans({ subsets: ["latin"], display: "swap", variable: "--font-dm-sans", }); const sarabun = Sarabun({ subsets: ["thai", "latin"], weight: ["400", "600", "700"], display: "swap", variable: "--font-sarabun", }); export const metadata: Metadata = { title: "Judge's Note", description: "ระบบ PDF Annotation สำหรับ e-Court", }; export default function RootLayout({ children, }: { children: React.ReactNode; }) { return ( {children} ); }