Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

feat(web): add built-in fonts for note text

tianma-if95e5ef0805f6
diff --git a/apps/web/src/assets/fonts/editor-body/OFL-lxgw-wenkai-screen.txt b/apps/web/src/assets/fonts/editor-body/OFL-lxgw-wenkai-screen.txt
new file mode 100644
index 00000000..19a46961
--- /dev/null
+++ b/apps/web/src/assets/fonts/editor-body/OFL-lxgw-wenkai-screen.txt
@@ -0,0 +1,94 @@
+Copyright 2021-2024 LXGW (https://github.com/lxgw/LxgwWenKai-Screen)
+Copyright 2020 The Klee Project Authors (https://github.com/fontworks-fonts/Klee)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+https://openfontlicense.org
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/apps/web/src/assets/fonts/editor-body/OFL-lxgw-wenkai.txt b/apps/web/src/assets/fonts/editor-body/OFL-lxgw-wenkai.txt
new file mode 100644
index 00000000..f170b5c5
--- /dev/null
+++ b/apps/web/src/assets/fonts/editor-body/OFL-lxgw-wenkai.txt
@@ -0,0 +1,94 @@
+Copyright 2021-2026 LXGW (https://github.com/lxgw/LxgwWenKai)
+Copyright 2020 The Klee Project Authors (https://github.com/fontworks-fonts/Klee)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+https://openfontlicense.org
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/apps/web/src/assets/fonts/editor-body/OFL-source-han-sans.txt b/apps/web/src/assets/fonts/editor-body/OFL-source-han-sans.txt
new file mode 100644
index 00000000..3ff0ccab
--- /dev/null
+++ b/apps/web/src/assets/fonts/editor-body/OFL-source-han-sans.txt
@@ -0,0 +1,96 @@
+Copyright 2014-2025 Adobe (http://www.adobe.com/), with Reserved Font
+Name 'Source'. Source is a trademark of Adobe in the United States
+and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License,
+Version 1.1.
+
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font
+creation efforts of academic and linguistic communities, and to
+provide a free and open framework in which fonts may be shared and
+improved in partnership with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply to
+any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software
+components as distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to,
+deleting, or substituting -- in part or in whole -- any of the
+components of the Original Version, by changing formats or by porting
+the Font Software to a new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed,
+modify, redistribute, and sell modified and unmodified copies of the
+Font Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components, in
+Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the
+corresponding Copyright Holder. This restriction only applies to the
+primary font name as presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created using
+the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/apps/web/src/assets/fonts/editor-body/OFL-source-han-serif.txt b/apps/web/src/assets/fonts/editor-body/OFL-source-han-serif.txt
new file mode 100644
index 00000000..07235a78
--- /dev/null
+++ b/apps/web/src/assets/fonts/editor-body/OFL-source-han-serif.txt
@@ -0,0 +1,96 @@
+Copyright 2017-2022 Adobe (http://www.adobe.com/), with Reserved Font
+Name 'Source'. Source is a trademark of Adobe in the United States
+and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License,
+Version 1.1.
+
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font
+creation efforts of academic and linguistic communities, and to
+provide a free and open framework in which fonts may be shared and
+improved in partnership with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply to
+any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software
+components as distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to,
+deleting, or substituting -- in part or in whole -- any of the
+components of the Original Version, by changing formats or by porting
+the Font Software to a new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed,
+modify, redistribute, and sell modified and unmodified copies of the
+Font Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components, in
+Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the
+corresponding Copyright Holder. This restriction only applies to the
+primary font name as presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created using
+the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/apps/web/src/assets/fonts/editor-body/OFL-source-serif-4.txt b/apps/web/src/assets/fonts/editor-body/OFL-source-serif-4.txt
new file mode 100644
index 00000000..5871e1f3
--- /dev/null
+++ b/apps/web/src/assets/fonts/editor-body/OFL-source-serif-4.txt
@@ -0,0 +1,93 @@
+Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/apps/web/src/assets/fonts/editor-body/hei.woff2 b/apps/web/src/assets/fonts/editor-body/hei.woff2
new file mode 100644
index 00000000..a9f668d4
Binary files /dev/null and b/apps/web/src/assets/fonts/editor-body/hei.woff2 differ
diff --git a/apps/web/src/assets/fonts/editor-body/kai-screen.woff2 b/apps/web/src/assets/fonts/editor-body/kai-screen.woff2
new file mode 100644
index 00000000..dffca50d
Binary files /dev/null and b/apps/web/src/assets/fonts/editor-body/kai-screen.woff2 differ
diff --git a/apps/web/src/assets/fonts/editor-body/kai.woff2 b/apps/web/src/assets/fonts/editor-body/kai.woff2
new file mode 100644
index 00000000..0a0efacd
Binary files /dev/null and b/apps/web/src/assets/fonts/editor-body/kai.woff2 differ
diff --git a/apps/web/src/assets/fonts/editor-body/song.woff2 b/apps/web/src/assets/fonts/editor-body/song.woff2
new file mode 100644
index 00000000..db0378a1
Binary files /dev/null and b/apps/web/src/assets/fonts/editor-body/song.woff2 differ
diff --git a/apps/web/src/assets/fonts/editor-body/source-serif-4-regular.woff2 b/apps/web/src/assets/fonts/editor-body/source-serif-4-regular.woff2
new file mode 100644
index 00000000..0263fc30
Binary files /dev/null and b/apps/web/src/assets/fonts/editor-body/source-serif-4-regular.woff2 differ
diff --git a/apps/web/src/components/settings/PreferenceCard.test.mjs b/apps/web/src/components/settings/PreferenceCard.test.mjs
index c187fbbb..450b14ed 100644
--- a/apps/web/src/components/settings/PreferenceCard.test.mjs
+++ b/apps/web/src/components/settings/PreferenceCard.test.mjs
@@ -1,5 +1,26 @@
import { describe, expect, test } from "bun:test";
-import { readFileSync } from "node:fs";
+import { existsSync, readFileSync } from "node:fs";
+
+describe("editor body font preference", () => {
+ test("is chosen from settings and offers the bundled faces", () => {
+ const preferenceCard = readFileSync(new URL("./PreferenceCard.tsx", import.meta.url), "utf8");
+ const editorFonts = readFileSync(new URL("../../styles/editor-body-fonts.css", import.meta.url), "utf8");
+ const fontFaces = readFileSync(new URL("../../lib/editor-body-font-faces.ts", import.meta.url), "utf8");
+
+ expect(preferenceCard).toContain('t("settings.editorBodyFontTitle")');
+ expect(preferenceCard).toContain('value="wenkai"');
+ expect(preferenceCard).toContain('value="source-han-serif"');
+ expect(preferenceCard).toContain('value="custom"');
+ expect(fontFaces).toContain('fontFace("EdgeEver Kai"');
+ expect(fontFaces).toContain('fontFace("EdgeEver Song"');
+ expect(fontFaces).toContain("kai.woff2?url");
+ expect(editorFonts).toContain("html[data-editor-body-font] .edgeever-editor .ProseMirror");
+ expect(editorFonts).not.toContain(".edgeever-code-source");
+ for (const fileName of ["kai.woff2", "kai-screen.woff2", "song.woff2", "hei.woff2", "source-serif-4-regular.woff2", "OFL-lxgw-wenkai.txt", "OFL-source-han-serif.txt", "OFL-source-serif-4.txt"]) {
+ expect(existsSync(new URL(`../../assets/fonts/editor-body/${fileName}`, import.meta.url))).toBe(true);
+ }
+ });
+});
describe("editor content alignment preference", () => {
test("is configured from settings instead of the per-note toolbar", () => {
diff --git a/apps/web/src/components/settings/PreferenceCard.tsx b/apps/web/src/components/settings/PreferenceCard.tsx
index 9a1a659b..6d699636 100644
--- a/apps/web/src/components/settings/PreferenceCard.tsx
+++ b/apps/web/src/components/settings/PreferenceCard.tsx
@@ -1,4 +1,4 @@
-import { AlignHorizontalJustifyCenter, ChartNoAxesCombined, Image, Keyboard, Languages, MousePointerClick, Palette, Sparkles, SunMoon } from "lucide-react";
+import { AlignHorizontalJustifyCenter, ChartNoAxesCombined, Image, Keyboard, Languages, MousePointerClick, Palette, Sparkles, SunMoon, Type } from "lucide-react";
import { useState, useEffect } from "react";
import { useTranslation } from "react-i18next";
import type { EditorContentAlignment, ShortcutSettings } from "@/lib/app-helpers";
@@ -19,6 +19,7 @@ import {
writeAiSpaceShortcutPreference,
} from "@/lib/ai-space-shortcut-preference";
import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import {
SETTINGS_CARD_HEADER_CLASSNAME,
@@ -37,6 +38,12 @@ import {
supportedLocales,
type AppLocalePreference,
} from "@/i18n";
+import {
+ applyEditorBodyFontPreference,
+ readEditorBodyFontPreference,
+ writeEditorBodyFontPreference,
+ type EditorBodyFontChoice,
+} from "@/lib/editor-body-font";
import { ShortcutSettingsItem } from "./ShortcutSettingsItem";
import { CustomEditorThemeDialog } from "./CustomEditorThemeDialog";
import {
@@ -84,6 +91,7 @@ export const PreferenceCard = ({
const [linkOpenMode, setLinkOpenMode] = useState<EditorLinkOpenMode>(() => getStoredEditorLinkOpenMode());
const [aiSelectionMenuEnabled, setAiSelectionMenuEnabled] = useState(readAiSelectionMenuPreference);
const [aiSpaceShortcutEnabled, setAiSpaceShortcutEnabled] = useState(readAiSpaceShortcutPreference);
+ const [editorBodyFont, setEditorBodyFont] = useState(readEditorBodyFontPreference);
useEffect(() => {
const mediaQuery = window.matchMedia("(max-width: 640px)");
@@ -195,6 +203,12 @@ export const PreferenceCard = ({
void changeAppLocalePreference(preference);
};
+ const updateEditorBodyFont = (preference: { choice: EditorBodyFontChoice; customFamily: string }) => {
+ setEditorBodyFont(preference);
+ writeEditorBodyFontPreference(preference);
+ applyEditorBodyFontPreference(preference);
+ };
+
return (
<Card className="w-full min-w-0 overflow-hidden shadow-none">
<CardHeader className={SETTINGS_CARD_HEADER_CLASSNAME}>
@@ -281,6 +295,45 @@ export const PreferenceCard = ({
</div>
</div>
+ <div className="flex min-h-16 flex-col items-start gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
+ <div className="flex min-w-0 items-start gap-3">
+ <Type className={SETTINGS_ITEM_ICON_CLASSNAME} />
+ <div className="min-w-0">
+ <div className={SETTINGS_ITEM_TITLE_CLASSNAME}>{t("settings.editorBodyFontTitle")}</div>
+ <div className={SETTINGS_ITEM_DESCRIPTION_CLASSNAME}>{t("settings.editorBodyFontDescription")}</div>
+ </div>
+ </div>
+ <div className="flex w-full shrink-0 flex-col gap-2 sm:w-80">
+ <Select
+ value={editorBodyFont.choice}
+ onValueChange={(value) => updateEditorBodyFont({ choice: value as EditorBodyFontChoice, customFamily: editorBodyFont.customFamily })}
+ >
+ <SelectTrigger aria-label={t("settings.editorBodyFontTitle")} className="h-9 bg-card">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="system">{t("settings.editorBodyFonts.system")}</SelectItem>
+ <SelectItem value="wenkai">{t("settings.editorBodyFonts.wenkai")}</SelectItem>
+ <SelectItem value="wenkai-screen">{t("settings.editorBodyFonts.wenkaiScreen")}</SelectItem>
+ <SelectItem value="source-han-serif">{t("settings.editorBodyFonts.sourceHanSerif")}</SelectItem>
+ <SelectItem value="source-han-sans">{t("settings.editorBodyFonts.sourceHanSans")}</SelectItem>
+ <SelectItem value="source-serif">{t("settings.editorBodyFonts.sourceSerif")}</SelectItem>
+ <SelectItem value="custom">{t("settings.editorBodyFonts.custom")}</SelectItem>
+ </SelectContent>
+ </Select>
+ {editorBodyFont.choice === "custom" ? (
+ <Input
+ value={editorBodyFont.customFamily}
+ aria-label={t("settings.editorBodyFontCustomLabel")}
+ placeholder={t("settings.editorBodyFontCustomPlaceholder")}
+ className="h-9"
+ maxLength={200}
+ onChange={(event) => updateEditorBodyFont({ choice: "custom", customFamily: event.target.value })}
+ />
+ ) : null}
+ </div>
+ </div>
+
{!isMobile && (
<div className="flex min-h-16 flex-col items-start gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
<div className="flex min-w-0 items-start gap-3">
diff --git a/apps/web/src/lib/editor-body-font-faces.ts b/apps/web/src/lib/editor-body-font-faces.ts
new file mode 100644
index 00000000..45d9b26f
--- /dev/null
+++ b/apps/web/src/lib/editor-body-font-faces.ts
@@ -0,0 +1,31 @@
+import heiUrl from "../assets/fonts/editor-body/hei.woff2?url";
+import kaiScreenUrl from "../assets/fonts/editor-body/kai-screen.woff2?url";
+import kaiUrl from "../assets/fonts/editor-body/kai.woff2?url";
+import songUrl from "../assets/fonts/editor-body/song.woff2?url";
+import sourceSerifUrl from "../assets/fonts/editor-body/source-serif-4-regular.woff2?url";
+
+const FONT_FACE_STYLE_ID = "edgeever-editor-body-fonts";
+
+const fontFace = (family: string, url: string) => `@font-face {
+ font-family: "${family}";
+ src: url("${url}") format("woff2");
+ font-weight: 400;
+ font-style: normal;
+ font-display: swap;
+}`;
+
+const FONT_FACE_CSS = [
+ fontFace("EdgeEver Kai", kaiUrl),
+ fontFace("EdgeEver Kai Screen", kaiScreenUrl),
+ fontFace("EdgeEver Song", songUrl),
+ fontFace("EdgeEver Hei", heiUrl),
+ fontFace("Source Serif 4", sourceSerifUrl),
+].join("\n");
+
+export const installEditorBodyFontFaces = () => {
+ if (typeof document === "undefined" || document.getElementById(FONT_FACE_STYLE_ID)) return;
+ const style = document.createElement("style");
+ style.id = FONT_FACE_STYLE_ID;
+ style.textContent = FONT_FACE_CSS;
+ document.head.appendChild(style);
+};
diff --git a/apps/web/src/lib/editor-body-font.test.mjs b/apps/web/src/lib/editor-body-font.test.mjs
new file mode 100644
index 00000000..acc0eded
--- /dev/null
+++ b/apps/web/src/lib/editor-body-font.test.mjs
@@ -0,0 +1,105 @@
+import { afterEach, describe, expect, test } from "bun:test";
+import {
+ EDITOR_BODY_FONT_CUSTOM_STORAGE_KEY,
+ EDITOR_BODY_FONT_STORAGE_KEY,
+ applyEditorBodyFontPreference,
+ readEditorBodyFontPreference,
+ resolveEditorBodyFontStack,
+ sanitizeEditorBodyFontFamily,
+ writeEditorBodyFontPreference,
+} from "./editor-body-font.ts";
+
+const installLocalStorage = () => {
+ const values = new Map();
+ globalThis.window = {
+ localStorage: {
+ getItem: (key) => values.get(key) ?? null,
+ setItem: (key, value) => values.set(key, String(value)),
+ },
+ };
+ return values;
+};
+
+describe("editor body font preference", () => {
+ afterEach(() => {
+ delete globalThis.window;
+ delete globalThis.document;
+ });
+
+ test("defaults to the system face and ignores unknown choices", () => {
+ const values = installLocalStorage();
+ expect(readEditorBodyFontPreference()).toEqual({ choice: "system", customFamily: "" });
+
+ values.set(EDITOR_BODY_FONT_STORAGE_KEY, "comic-sans");
+ expect(readEditorBodyFontPreference().choice).toBe("system");
+ });
+
+ test("persists a bundled face and a custom family", () => {
+ const values = installLocalStorage();
+ writeEditorBodyFontPreference({ choice: "wenkai", customFamily: "霞鹜文楷" });
+ expect(values.get(EDITOR_BODY_FONT_STORAGE_KEY)).toBe("wenkai");
+ expect(values.get(EDITOR_BODY_FONT_CUSTOM_STORAGE_KEY)).toBe("霞鹜文楷");
+ expect(readEditorBodyFontPreference()).toEqual({ choice: "wenkai", customFamily: "霞鹜文楷" });
+ });
+
+ test("falls back when local storage is unavailable", () => {
+ globalThis.window = {
+ localStorage: {
+ getItem: () => {
+ throw new Error("blocked");
+ },
+ setItem: () => {
+ throw new Error("blocked");
+ },
+ },
+ };
+ expect(readEditorBodyFontPreference()).toEqual({ choice: "system", customFamily: "" });
+ expect(() => writeEditorBodyFontPreference({ choice: "source-han-serif", customFamily: "" })).not.toThrow();
+ });
+
+ test("keeps installed font names and rejects style injection", () => {
+ expect(sanitizeEditorBodyFontFamily(" LXGW WenKai ")).toBe("LXGW WenKai");
+ expect(sanitizeEditorBodyFontFamily('"Source Han Serif SC", Songti SC')).toBe('"Source Han Serif SC", Songti SC');
+ expect(sanitizeEditorBodyFontFamily("霞鹜文楷")).toBe("霞鹜文楷");
+ expect(sanitizeEditorBodyFontFamily("")).toBe("");
+ expect(sanitizeEditorBodyFontFamily("WenKai; color: red")).toBe("");
+ expect(sanitizeEditorBodyFontFamily("url(https://evil.example/font.woff2)")).toBe("");
+ expect(sanitizeEditorBodyFontFamily("a".repeat(201))).toBe("");
+ });
+
+ test("resolves bundled stacks and appends a system fallback to custom names", () => {
+ expect(resolveEditorBodyFontStack({ choice: "system", customFamily: "" })).toBeNull();
+ expect(resolveEditorBodyFontStack({ choice: "wenkai", customFamily: "" })).toContain("EdgeEver Kai");
+ expect(resolveEditorBodyFontStack({ choice: "wenkai-screen", customFamily: "" })).toContain("EdgeEver Kai Screen");
+ expect(resolveEditorBodyFontStack({ choice: "source-han-serif", customFamily: "" })).toContain("EdgeEver Song");
+ expect(resolveEditorBodyFontStack({ choice: "source-han-serif", customFamily: "" })).toContain("Source Serif 4");
+ expect(resolveEditorBodyFontStack({ choice: "source-han-sans", customFamily: "" })).toContain("EdgeEver Hei");
+ expect(resolveEditorBodyFontStack({ choice: "source-serif", customFamily: "" })).toContain("Source Serif 4");
+ expect(resolveEditorBodyFontStack({ choice: "custom", customFamily: "LXGW WenKai" })).toContain("LXGW WenKai");
+ expect(resolveEditorBodyFontStack({ choice: "custom", customFamily: "LXGW WenKai" })).toContain("PingFang SC");
+ expect(resolveEditorBodyFontStack({ choice: "custom", customFamily: "bad; family" })).toBeNull();
+ });
+
+ test("publishes the resolved stack on the document and clears it for the system face", () => {
+ installLocalStorage();
+ const style = new Map();
+ const dataset = {};
+ globalThis.document = {
+ documentElement: {
+ dataset,
+ style: {
+ setProperty: (key, value) => style.set(key, value),
+ removeProperty: (key) => style.delete(key),
+ },
+ },
+ };
+
+ applyEditorBodyFontPreference({ choice: "source-han-sans", customFamily: "" });
+ expect(dataset.editorBodyFont).toBe("source-han-sans");
+ expect(style.get("--editor-body-font-family")).toContain("EdgeEver Hei");
+
+ applyEditorBodyFontPreference({ choice: "system", customFamily: "" });
+ expect(dataset.editorBodyFont).toBeUndefined();
+ expect(style.has("--editor-body-font-family")).toBe(false);
+ });
+});
diff --git a/apps/web/src/lib/editor-body-font.ts b/apps/web/src/lib/editor-body-font.ts
new file mode 100644
index 00000000..8e96de7f
--- /dev/null
+++ b/apps/web/src/lib/editor-body-font.ts
@@ -0,0 +1,99 @@
+export const EDITOR_BODY_FONT_STORAGE_KEY = "edgeever.editorBodyFont";
+export const EDITOR_BODY_FONT_CUSTOM_STORAGE_KEY = "edgeever.editorBodyFontCustom";
+
+export const EDITOR_BODY_FONT_CHOICES = [
+ "system",
+ "wenkai",
+ "wenkai-screen",
+ "source-han-serif",
+ "source-han-sans",
+ "source-serif",
+ "custom",
+] as const;
+
+export type EditorBodyFontChoice = (typeof EDITOR_BODY_FONT_CHOICES)[number];
+
+export type EditorBodyFontPreference = {
+ choice: EditorBodyFontChoice;
+ customFamily: string;
+};
+
+const CJK_FALLBACK =
+ '-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif';
+
+const BUNDLED_FONT_STACKS: Record<Exclude<EditorBodyFontChoice, "system" | "custom">, string> = {
+ wenkai: `"EdgeEver Kai", ${CJK_FALLBACK}`,
+ "wenkai-screen": `"EdgeEver Kai Screen", ${CJK_FALLBACK}`,
+ "source-han-serif": `"Source Serif 4", "EdgeEver Song", ${CJK_FALLBACK}`,
+ "source-han-sans": `"EdgeEver Hei", ${CJK_FALLBACK}`,
+ "source-serif": `"Source Serif 4", ${CJK_FALLBACK}`,
+};
+
+const CUSTOM_FONT_FAMILY_PATTERN = /^[\p{L}\p{N}\s,'"._-]+$/u;
+const MAX_CUSTOM_FONT_FAMILY_LENGTH = 200;
+
+const DEFAULT_PREFERENCE: EditorBodyFontPreference = {
+ choice: "system",
+ customFamily: "",
+};
+
+export const isEditorBodyFontChoice = (value: string | null | undefined): value is EditorBodyFontChoice =>
+ EDITOR_BODY_FONT_CHOICES.some((choice) => choice === value);
+
+export const sanitizeEditorBodyFontFamily = (value: string) => {
+ const normalized = value.trim().replace(/\s+/g, " ");
+ if (!normalized || normalized.length > MAX_CUSTOM_FONT_FAMILY_LENGTH || !CUSTOM_FONT_FAMILY_PATTERN.test(normalized)) {
+ return "";
+ }
+ return normalized;
+};
+
+export const resolveEditorBodyFontStack = (preference: EditorBodyFontPreference) => {
+ if (preference.choice === "system") return null;
+ if (preference.choice === "custom") {
+ const family = sanitizeEditorBodyFontFamily(preference.customFamily);
+ return family ? `${family}, ${CJK_FALLBACK}` : null;
+ }
+ return BUNDLED_FONT_STACKS[preference.choice];
+};
+
+const readStorage = (key: string) => {
+ try {
+ return window.localStorage.getItem(key);
+ } catch {
+ return null;
+ }
+};
+
+const writeStorage = (key: string, value: string) => {
+ try {
+ window.localStorage.setItem(key, value);
+ } catch {
+ // Local storage can be unavailable in private or restricted browser contexts.
+ }
+};
+
+export const readEditorBodyFontPreference = (): EditorBodyFontPreference => {
+ const storedChoice = readStorage(EDITOR_BODY_FONT_STORAGE_KEY);
+ const customFamily = readStorage(EDITOR_BODY_FONT_CUSTOM_STORAGE_KEY) ?? "";
+ if (!isEditorBodyFontChoice(storedChoice)) return { ...DEFAULT_PREFERENCE, customFamily };
+ return { choice: storedChoice, customFamily };
+};
+
+export const writeEditorBodyFontPreference = (preference: EditorBodyFontPreference) => {
+ writeStorage(EDITOR_BODY_FONT_STORAGE_KEY, preference.choice);
+ writeStorage(EDITOR_BODY_FONT_CUSTOM_STORAGE_KEY, preference.customFamily.slice(0, MAX_CUSTOM_FONT_FAMILY_LENGTH));
+};
+
+export const applyEditorBodyFontPreference = (preference = readEditorBodyFontPreference()) => {
+ if (typeof document === "undefined") return;
+ const root = document.documentElement;
+ const stack = resolveEditorBodyFontStack(preference);
+ if (!stack) {
+ delete root.dataset.editorBodyFont;
+ root.style.removeProperty("--editor-body-font-family");
+ return;
+ }
+ root.dataset.editorBodyFont = preference.choice;
+ root.style.setProperty("--editor-body-font-family", stack);
+};
diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx
index 9a17691a..293d2301 100644
--- a/apps/web/src/main.tsx
+++ b/apps/web/src/main.tsx
@@ -8,9 +8,12 @@ import { bootstrapI18n } from "./i18n";
import { emitPwaUpdateNotice } from "./lib/pwa-update-notice";
import { withEnvironmentTitlePrefix } from "./lib/environment-title";
import { initializeTheme, ThemeProvider } from "./components/ThemeProvider";
+import { applyEditorBodyFontPreference } from "./lib/editor-body-font";
+import { installEditorBodyFontFaces } from "./lib/editor-body-font-faces";
import { DesktopRendererErrorBoundary } from "./components/DesktopRendererErrorBoundary";
import { reportDesktopRendererReadyAfterPaint } from "./lib/desktop-renderer-ready";
import "./styles/globals.css";
+import "./styles/editor-body-fonts.css";
const PWA_UPDATE_CHECK_INTERVAL_MS = 10 * 60 * 1_000;
const DEVELOPMENT_PWA_RELOAD_KEY = "edgeever.dev-pwa-reset";
@@ -113,6 +116,8 @@ const mountApp = () => {
}
initializeTheme();
+ installEditorBodyFontFaces();
+ applyEditorBodyFontPreference();
const Router = isDesktopRenderer ? HashRouter : BrowserRouter;
createRoot(root, {
diff --git a/apps/web/src/mobile-edit.tsx b/apps/web/src/mobile-edit.tsx
index 556faa94..bae0606c 100644
--- a/apps/web/src/mobile-edit.tsx
+++ b/apps/web/src/mobile-edit.tsx
@@ -3,9 +3,12 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { createRoot } from "react-dom/client";
import { MobileStandaloneTiptapEditor } from "@/components/MobileStandaloneTiptapEditor";
import { initializeTheme } from "@/components/ThemeProvider";
+import { applyEditorBodyFontPreference } from "@/lib/editor-body-font";
+import { installEditorBodyFontFaces } from "@/lib/editor-body-font-faces";
import { bootstrapI18n } from "@/i18n";
import { defaultLocale, getBrowserLocale } from "@/i18n/locales";
import "./styles/mobile-markdown-editor.css";
+import "./styles/editor-body-fonts.css";
declare global {
interface Window {
@@ -74,6 +77,8 @@ if (!root) {
}
initializeTheme();
+installEditorBodyFontFaces();
+applyEditorBodyFontPreference();
const queryClient = new QueryClient({
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1, staleTime: 15_000 } },
diff --git a/apps/web/src/styles/editor-body-fonts.css b/apps/web/src/styles/editor-body-fonts.css
new file mode 100644
index 00000000..e13d87ce
--- /dev/null
+++ b/apps/web/src/styles/editor-body-fonts.css
@@ -0,0 +1,16 @@
+/* Font files are registered from editor-body-font-faces.ts so Vite emits
+ * desktop-safe asset URLs. These rules only apply the chosen stack.
+ * Missing glyphs fall through to the system CJK fonts in that stack.
+ * Code, pre, and formula faces keep their own monospace families.
+ */
+html[data-editor-body-font] .edgeever-editor .ProseMirror,
+html[data-editor-body-font] .edgeever-editor textarea[data-edgeever-mobile-editor="plain-textarea"],
+html[data-editor-body-font] .edgeever-mobile-tiptap-content {
+ font-family: var(--editor-body-font-family);
+ font-synthesis: weight style;
+}
+
+html[data-editor-body-font] .edgeever-editor[data-editor-theme] .ProseMirror :is(h1, h2, h3, h4, h5, h6, p, li, blockquote, th, td),
+html[data-editor-body-font] .edgeever-mobile-tiptap-content :is(h1, h2, h3, h4, h5, h6, p, li, blockquote, th, td) {
+ font-family: var(--editor-body-font-family);
+}
diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.ts
index dfd2165f..f26c0d78 100644
--- a/packages/shared/src/i18n/en-US.ts
+++ b/packages/shared/src/i18n/en-US.ts
@@ -653,6 +653,19 @@ export const enUS = {
center: "Optimize readability (centered)",
start: "Align left",
},
+ editorBodyFontTitle: "Note text font",
+ editorBodyFontDescription: "Changes note text on this device.",
+ editorBodyFonts: {
+ system: "System",
+ wenkai: "LXGW WenKai",
+ wenkaiScreen: "LXGW WenKai Screen",
+ sourceHanSerif: "Source Han Serif",
+ sourceHanSans: "Source Han Sans",
+ sourceSerif: "Latin serif",
+ custom: "Custom",
+ },
+ editorBodyFontCustomLabel: "Font name",
+ editorBodyFontCustomPlaceholder: "LXGW WenKai",
editorThemes: {
default: "Native theme",
letter: "Warm Page",
diff --git a/packages/shared/src/i18n/ja.ts b/packages/shared/src/i18n/ja.ts
index f61dd3a8..7f3be65e 100644
--- a/packages/shared/src/i18n/ja.ts
+++ b/packages/shared/src/i18n/ja.ts
@@ -653,6 +653,19 @@ export const ja = {
center: "読みやすさを優先(中央)",
start: "左揃え",
},
+ editorBodyFontTitle: "ノート本文のフォント",
+ editorBodyFontDescription: "この端末のノート本文だけを変えます。",
+ editorBodyFonts: {
+ system: "システム",
+ wenkai: "霞鹜文楷",
+ wenkaiScreen: "霞鹜文楷スクリーン",
+ sourceHanSerif: "源ノ明朝",
+ sourceHanSans: "源ノ角ゴシック",
+ sourceSerif: "欧文セリフ",
+ custom: "カスタム",
+ },
+ editorBodyFontCustomLabel: "フォント名",
+ editorBodyFontCustomPlaceholder: "LXGW WenKai",
editorThemes: {
default: "標準テーマ",
letter: "あたたかな紙",
diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.ts
index 7fa4a845..78cc5253 100644
--- a/packages/shared/src/i18n/zh-CN.ts
+++ b/packages/shared/src/i18n/zh-CN.ts
@@ -653,6 +653,19 @@ export const zhCN = {
center: "优化可读性(居中)",
start: "靠左显示",
},
+ editorBodyFontTitle: "笔记正文字体",
+ editorBodyFontDescription: "只改变本机的笔记正文。",
+ editorBodyFonts: {
+ system: "跟随系统",
+ wenkai: "霞鹜文楷",
+ wenkaiScreen: "霞鹜文楷屏幕版",
+ sourceHanSerif: "思源宋体",
+ sourceHanSans: "思源黑体",
+ sourceSerif: "西文衬线",
+ custom: "自定义",
+ },
+ editorBodyFontCustomLabel: "字体名称",
+ editorBodyFontCustomPlaceholder: "例如 LXGW WenKai",
editorThemes: {
default: "原生主题",
letter: "日暖素笺",