refactor(fonts): 将Google字体替换为本地字体文件
使用本地字体文件替代Google字体,提升加载性能并避免隐私问题
This commit is contained in:
@@ -4,20 +4,32 @@ import { TooltipProvider } from "@/components/ui/tooltip";
|
||||
import { DATA } from "@/data/resume";
|
||||
import { cn } from "@/lib/utils";
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import localFont from "next/font/local";
|
||||
import "./globals.css";
|
||||
import { FlickeringGrid } from "@/components/magicui/flickering-grid";
|
||||
|
||||
const geist = Geist({
|
||||
subsets: ["latin"],
|
||||
const geist = localFont({
|
||||
src: [
|
||||
{
|
||||
path: "../../public/fonts/CabinetGrotesk-Medium.ttf",
|
||||
weight: "500",
|
||||
style: "normal",
|
||||
},
|
||||
],
|
||||
variable: "--font-sans",
|
||||
weight: ["400", "500", "600", "700"],
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
subsets: ["latin"],
|
||||
weight: ["300", "400", "500", "600", "700"],
|
||||
const geistMono = localFont({
|
||||
src: [
|
||||
{
|
||||
path: "../../public/fonts/ClashDisplay-Semibold.ttf",
|
||||
weight: "600",
|
||||
style: "normal",
|
||||
},
|
||||
],
|
||||
variable: "--font-mono",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
|
||||
Reference in New Issue
Block a user