编辑器设置了字体的情况

This commit is contained in:
Jeffrey Chen 2024-11-23 18:38:33 +08:00
parent 383eb86aa5
commit 608134e4ca
2 changed files with 2 additions and 1 deletions

View file

@ -1,5 +1,6 @@
@font-face {
font-family: "Number Glyphs";
/* 如果设置了编辑器字体,这里应该先加载${window.siyuan.config.editor.fontFamily} */
src: local("Helvetica Neue"),
local("Luxi Sans"),
local("DejaVu Sans"),

View file

@ -219,7 +219,7 @@ export const setInlineStyle = (set = true) => {
.protyle-wysiwyg .li {min-height:${height + 8}px}
.protyle-gutters button svg {height:${height}px}`;
if (window.siyuan.config.editor.fontFamily) {
style += `\n.b3-typography:not(.b3-typography--default), .protyle-wysiwyg, .protyle-title {font-family: "${window.siyuan.config.editor.fontFamily}", var(--b3-font-family-protyle)}`;
style += `\n.b3-typography:not(.b3-typography--default), .protyle-wysiwyg, .protyle-title {font-family: "Number Glyphs", "Segoe Good Emoji", "SiYuan Emoji", "${window.siyuan.config.editor.fontFamily}", var(--b3-font-family-text)}`;
}
// pad 端菜单移除显示,如工作空间
if ("ontouchend" in document) {