refactor(fonts): use woff2 athelas assets
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5
-5
@@ -25,8 +25,8 @@ const geistMono = Geist_Mono({
|
|||||||
/**
|
/**
|
||||||
* Athelas 本地字体。
|
* Athelas 本地字体。
|
||||||
*
|
*
|
||||||
* 原始资源:/Users/chase/Documents/cozsweet/fonts/Athelas-*.ttf
|
* 原始资源:/Users/chase/Documents/cozsweet/fonts/Athelas-*.woff2
|
||||||
* 放置位置:/public/fonts/Athelas-*.ttf
|
* 放置位置:/public/fonts/Athelas-*.woff2
|
||||||
*
|
*
|
||||||
* 路径计算(`next/font/local` 要求相对路径从调用文件出发):
|
* 路径计算(`next/font/local` 要求相对路径从调用文件出发):
|
||||||
* src/core/fonts.ts → ../../public/fonts/...
|
* src/core/fonts.ts → ../../public/fonts/...
|
||||||
@@ -34,17 +34,17 @@ const geistMono = Geist_Mono({
|
|||||||
const athelas = localFont({
|
const athelas = localFont({
|
||||||
src: [
|
src: [
|
||||||
{
|
{
|
||||||
path: "../../public/fonts/Athelas-Regular.ttf",
|
path: "../../public/fonts/Athelas-Regular.woff2",
|
||||||
weight: "400",
|
weight: "400",
|
||||||
style: "normal",
|
style: "normal",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "../../public/fonts/Athelas-Bold.ttf",
|
path: "../../public/fonts/Athelas-Bold.woff2",
|
||||||
weight: "700",
|
weight: "700",
|
||||||
style: "normal",
|
style: "normal",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "../../public/fonts/Athelas-BoldItalic.ttf",
|
path: "../../public/fonts/Athelas-BoldItalic.woff2",
|
||||||
weight: "700",
|
weight: "700",
|
||||||
style: "italic",
|
style: "italic",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user