diff --git a/src/App.jsx b/src/App.jsx index 72dbac6..27f0f27 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,4 +1,4 @@ -import SSFangTangTi from "./fonts/ShangShouFangTangTi.woff2"; +import Inter from "./fonts/Inter.woff2"; import "./App.css"; import Canvas from "./components/Canvas"; import { useState, useEffect } from "react"; @@ -21,7 +21,7 @@ function App() { let controller; try { controller = new AbortController(); - preloadFont("SSFangTangTi", SSFangTangTi, controller.signal); + preloadFont("Inter", Inter, controller.signal); } catch (error) { console.error(error); } finally { diff --git a/src/fonts/Inter.woff2 b/src/fonts/Inter.woff2 new file mode 100644 index 0000000..07d3c53 Binary files /dev/null and b/src/fonts/Inter.woff2 differ diff --git a/src/index.css b/src/index.css index 1bcb909..119a52c 100644 --- a/src/index.css +++ b/src/index.css @@ -12,4 +12,9 @@ body { @font-face { font-family: 'SSFangTangTi'; src: local('SSFangTangTi'), url(./fonts/ShangShouFangTangTi.woff2) format('woff2'); +} + +@font-face { + font-family: 'Inter'; + src: local('Inter'), url(./fonts/Inter.woff2) format('woff2'); } \ No newline at end of file