diff --git a/public/fonts/Athelas-Bold.ttf b/public/fonts/Athelas-Bold.ttf deleted file mode 100644 index ec990694..00000000 Binary files a/public/fonts/Athelas-Bold.ttf and /dev/null differ diff --git a/public/fonts/Athelas-Bold.woff2 b/public/fonts/Athelas-Bold.woff2 new file mode 100644 index 00000000..dc895bf8 Binary files /dev/null and b/public/fonts/Athelas-Bold.woff2 differ diff --git a/public/fonts/Athelas-BoldItalic.ttf b/public/fonts/Athelas-BoldItalic.ttf deleted file mode 100644 index 6a66f43b..00000000 Binary files a/public/fonts/Athelas-BoldItalic.ttf and /dev/null differ diff --git a/public/fonts/Athelas-BoldItalic.woff2 b/public/fonts/Athelas-BoldItalic.woff2 new file mode 100644 index 00000000..897aba5f Binary files /dev/null and b/public/fonts/Athelas-BoldItalic.woff2 differ diff --git a/public/fonts/Athelas-Regular.ttf b/public/fonts/Athelas-Regular.ttf deleted file mode 100644 index 4e4dc310..00000000 Binary files a/public/fonts/Athelas-Regular.ttf and /dev/null differ diff --git a/public/fonts/Athelas-Regular.woff2 b/public/fonts/Athelas-Regular.woff2 new file mode 100644 index 00000000..c579d396 Binary files /dev/null and b/public/fonts/Athelas-Regular.woff2 differ diff --git a/src/core/fonts.ts b/src/core/fonts.ts index 0cdc0a53..a56bb8f0 100644 --- a/src/core/fonts.ts +++ b/src/core/fonts.ts @@ -25,8 +25,8 @@ const geistMono = Geist_Mono({ /** * Athelas 本地字体。 * - * 原始资源:/Users/chase/Documents/cozsweet/fonts/Athelas-*.ttf - * 放置位置:/public/fonts/Athelas-*.ttf + * 原始资源:/Users/chase/Documents/cozsweet/fonts/Athelas-*.woff2 + * 放置位置:/public/fonts/Athelas-*.woff2 * * 路径计算(`next/font/local` 要求相对路径从调用文件出发): * src/core/fonts.ts → ../../public/fonts/... @@ -34,17 +34,17 @@ const geistMono = Geist_Mono({ const athelas = localFont({ src: [ { - path: "../../public/fonts/Athelas-Regular.ttf", + path: "../../public/fonts/Athelas-Regular.woff2", weight: "400", style: "normal", }, { - path: "../../public/fonts/Athelas-Bold.ttf", + path: "../../public/fonts/Athelas-Bold.woff2", weight: "700", style: "normal", }, { - path: "../../public/fonts/Athelas-BoldItalic.ttf", + path: "../../public/fonts/Athelas-BoldItalic.woff2", weight: "700", style: "italic", },