From bd7d8fadd989784b3524ddca6d849714fed1a644 Mon Sep 17 00:00:00 2001 From: devjiwonchoi Date: Tue, 12 Nov 2024 21:32:42 +0900 Subject: [PATCH] CNA: replace geist font from local to google --- .../templates/app-tw/js/app/layout.js | 13 ++++++------- .../templates/app-tw/ts/app/layout.tsx | 13 ++++++------- .../create-next-app/templates/app/js/app/layout.js | 13 ++++++------- .../create-next-app/templates/app/ts/app/layout.tsx | 13 ++++++------- .../templates/default-tw/js/pages/index.js | 13 ++++++------- .../templates/default-tw/ts/pages/index.tsx | 13 ++++++------- .../templates/default/js/pages/index.js | 13 ++++++------- .../templates/default/ts/pages/index.tsx | 13 ++++++------- 8 files changed, 48 insertions(+), 56 deletions(-) diff --git a/packages/create-next-app/templates/app-tw/js/app/layout.js b/packages/create-next-app/templates/app-tw/js/app/layout.js index 9800bf8dde1c4e..7bf337d3342562 100644 --- a/packages/create-next-app/templates/app-tw/js/app/layout.js +++ b/packages/create-next-app/templates/app-tw/js/app/layout.js @@ -1,15 +1,14 @@ -import localFont from "next/font/local"; +import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", +const geistSans = Geist({ variable: "--font-geist-sans", - weight: "100 900", + subsets: ["latin"], }); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", + +const geistMono = Geist_Mono({ variable: "--font-geist-mono", - weight: "100 900", + subsets: ["latin"], }); export const metadata = { diff --git a/packages/create-next-app/templates/app-tw/ts/app/layout.tsx b/packages/create-next-app/templates/app-tw/ts/app/layout.tsx index a36cde01c60b91..f7fa87eb875260 100644 --- a/packages/create-next-app/templates/app-tw/ts/app/layout.tsx +++ b/packages/create-next-app/templates/app-tw/ts/app/layout.tsx @@ -1,16 +1,15 @@ import type { Metadata } from "next"; -import localFont from "next/font/local"; +import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", +const geistSans = Geist({ variable: "--font-geist-sans", - weight: "100 900", + subsets: ["latin"], }); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", + +const geistMono = Geist_Mono({ variable: "--font-geist-mono", - weight: "100 900", + subsets: ["latin"], }); export const metadata: Metadata = { diff --git a/packages/create-next-app/templates/app/js/app/layout.js b/packages/create-next-app/templates/app/js/app/layout.js index 08210ccaab532b..66c5e125e6b963 100644 --- a/packages/create-next-app/templates/app/js/app/layout.js +++ b/packages/create-next-app/templates/app/js/app/layout.js @@ -1,15 +1,14 @@ -import localFont from "next/font/local"; +import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", +const geistSans = Geist({ variable: "--font-geist-sans", - weight: "100 900", + subsets: ["latin"], }); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", + +const geistMono = Geist_Mono({ variable: "--font-geist-mono", - weight: "100 900", + subsets: ["latin"], }); export const metadata = { diff --git a/packages/create-next-app/templates/app/ts/app/layout.tsx b/packages/create-next-app/templates/app/ts/app/layout.tsx index dca06aee77143f..42fc323e4b835c 100644 --- a/packages/create-next-app/templates/app/ts/app/layout.tsx +++ b/packages/create-next-app/templates/app/ts/app/layout.tsx @@ -1,16 +1,15 @@ import type { Metadata } from "next"; -import localFont from "next/font/local"; +import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", +const geistSans = Geist({ variable: "--font-geist-sans", - weight: "100 900", + subsets: ["latin"], }); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", + +const geistMono = Geist_Mono({ variable: "--font-geist-mono", - weight: "100 900", + subsets: ["latin"], }); export const metadata: Metadata = { diff --git a/packages/create-next-app/templates/default-tw/js/pages/index.js b/packages/create-next-app/templates/default-tw/js/pages/index.js index b8284b30149618..7effc7e1fe6bb0 100644 --- a/packages/create-next-app/templates/default-tw/js/pages/index.js +++ b/packages/create-next-app/templates/default-tw/js/pages/index.js @@ -1,15 +1,14 @@ import Image from "next/image"; -import localFont from "next/font/local"; +import { Geist, Geist_Mono } from "next/font/google"; -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", +const geistSans = Geist({ variable: "--font-geist-sans", - weight: "100 900", + subsets: ["latin"], }); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", + +const geistMono = Geist_Mono({ variable: "--font-geist-mono", - weight: "100 900", + subsets: ["latin"], }); export default function Home() { diff --git a/packages/create-next-app/templates/default-tw/ts/pages/index.tsx b/packages/create-next-app/templates/default-tw/ts/pages/index.tsx index 5284ba5d5d9d6d..a8ec761d8e9695 100644 --- a/packages/create-next-app/templates/default-tw/ts/pages/index.tsx +++ b/packages/create-next-app/templates/default-tw/ts/pages/index.tsx @@ -1,15 +1,14 @@ import Image from "next/image"; -import localFont from "next/font/local"; +import { Geist, Geist_Mono } from "next/font/google"; -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", +const geistSans = Geist({ variable: "--font-geist-sans", - weight: "100 900", + subsets: ["latin"], }); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", + +const geistMono = Geist_Mono({ variable: "--font-geist-mono", - weight: "100 900", + subsets: ["latin"], }); export default function Home() { diff --git a/packages/create-next-app/templates/default/js/pages/index.js b/packages/create-next-app/templates/default/js/pages/index.js index 14198a6c5717cf..d3f2c8094822fa 100644 --- a/packages/create-next-app/templates/default/js/pages/index.js +++ b/packages/create-next-app/templates/default/js/pages/index.js @@ -1,17 +1,16 @@ import Head from "next/head"; import Image from "next/image"; -import localFont from "next/font/local"; +import { Geist, Geist_Mono } from "next/font/google"; import styles from "@/styles/Home.module.css"; -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", +const geistSans = Geist({ variable: "--font-geist-sans", - weight: "100 900", + subsets: ["latin"], }); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", + +const geistMono = Geist_Mono({ variable: "--font-geist-mono", - weight: "100 900", + subsets: ["latin"], }); export default function Home() { diff --git a/packages/create-next-app/templates/default/ts/pages/index.tsx b/packages/create-next-app/templates/default/ts/pages/index.tsx index 161a24e7300dd0..27d1d882221cd4 100644 --- a/packages/create-next-app/templates/default/ts/pages/index.tsx +++ b/packages/create-next-app/templates/default/ts/pages/index.tsx @@ -1,17 +1,16 @@ import Head from "next/head"; import Image from "next/image"; -import localFont from "next/font/local"; +import { Geist, Geist_Mono } from "next/font/google"; import styles from "@/styles/Home.module.css"; -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", +const geistSans = Geist({ variable: "--font-geist-sans", - weight: "100 900", + subsets: ["latin"], }); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", + +const geistMono = Geist_Mono({ variable: "--font-geist-mono", - weight: "100 900", + subsets: ["latin"], }); export default function Home() {