Skip to content

Commit

Permalink
字体优化
Browse files Browse the repository at this point in the history
  • Loading branch information
meetqy committed Feb 19, 2024
1 parent 6aea96d commit 4bc3137
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions src/app/load-font.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const isSupportFontFamily = (f: string): boolean => {
return g(h).join("") !== g(f).join("");
};

const kaiti = ["KaiTi SC", "KaiTi", "楷体-简", "楷体"];
const kaiti = ["KaiTi SC", "KaiTi", "楷体-简", "楷体", "SongTi SC"];

export default function LoadFont() {
useLayoutEffect(() => {
Expand All @@ -58,13 +58,10 @@ export default function LoadFont() {

const style = document.createElement("style");
style.innerHTML = `
:root {
--font-st-kaiti: "STKaiti";
}
.font-cursive {
font-family: var(--font-st-kaiti), cursive !important;
}`;
.font-bold {
font-weight:500;
}
`;
document.head.appendChild(style);
}
}, []);
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
"KaiTi",
"楷体-简",
"楷体",
"SongTi TC",
"SongTi SC",
"system-ui",
],
serif: ["Palatino", "Times New Roman"],
Expand Down

0 comments on commit 4bc3137

Please sign in to comment.