mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 16:34:06 +01:00
🎨 统一 --b3-font-family-protyle;合并 Number Glyphs Of Custom Font 和 Number Glyphs。 https://github.com/siyuan-note/siyuan/pull/13241
This commit is contained in:
parent
3d3def6ea2
commit
fec3211194
5 changed files with 42 additions and 39 deletions
|
|
@ -201,7 +201,28 @@ export const addGA = () => {
|
|||
|
||||
export const setInlineStyle = (set = true) => {
|
||||
const height = Math.floor(window.siyuan.config.editor.fontSize * 1.625);
|
||||
let style = `.b3-typography, .protyle-wysiwyg, .protyle-title {font-size:${window.siyuan.config.editor.fontSize}px !important}
|
||||
let style;
|
||||
if (window.siyuan.config.editor.fontFamily) {
|
||||
style = `@font-face {
|
||||
font-family: "Number Glyphs";
|
||||
src: local("${window.siyuan.config.editor.fontFamily}");
|
||||
unicode-range: U+30-39;
|
||||
}
|
||||
.b3-typography:not(.b3-typography--default), .protyle-wysiwyg, .protyle-title {font-family: "Number Glyphs", "Segoe Good Emoji", "Other SiYuan Emojis", "${window.siyuan.config.editor.fontFamily}", var(--b3-font-family-protyle)}`;
|
||||
} else {
|
||||
style = `@font-face {
|
||||
font-family: "Number Glyphs";
|
||||
src: local("Helvetica Neue"),
|
||||
local("Luxi Sans"),
|
||||
local("DejaVu Sans"),
|
||||
local("Hiragino Sans GB"),
|
||||
local("Segoe UI"),
|
||||
local("Microsoft Yahei"),
|
||||
local("sans-serif");
|
||||
unicode-range: U+30-39;
|
||||
}`;
|
||||
}
|
||||
style += `.b3-typography, .protyle-wysiwyg, .protyle-title {font-size:${window.siyuan.config.editor.fontSize}px !important}
|
||||
.b3-typography code:not(.hljs), .protyle-wysiwyg span[data-type~=code] { font-variant-ligatures: ${window.siyuan.config.editor.codeLigatures ? "normal" : "none"} }
|
||||
.li > .protyle-action {height:${height + 8}px;line-height: ${height + 8}px}
|
||||
.protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h1, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h2, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h3, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h4, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h5, .protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h6 {line-height:${height + 8}px;}
|
||||
|
|
@ -218,9 +239,6 @@ export const setInlineStyle = (set = true) => {
|
|||
.protyle-wysiwyg [data-node-id] {${window.siyuan.config.editor.justify ? " text-align: justify;" : ""}}
|
||||
.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: "Number Glyphs Of Custom Font", "Number Glyphs", "Segoe Good Emoji", "Other SiYuan Emojis", "${window.siyuan.config.editor.fontFamily}", var(--b3-font-family-protyle)}`;
|
||||
}
|
||||
// pad 端菜单移除显示,如工作空间
|
||||
if ("ontouchend" in document) {
|
||||
style += "\n.b3-menu .b3-menu__action {opacity: 0.68;}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue