Improve font family and emoji
修复符号 # * 显示为按键 emoji 字形
This commit is contained in:
parent
85ba2414fa
commit
551eccfb75
4 changed files with 12 additions and 12 deletions
|
@ -24,8 +24,8 @@
|
|||
/* 字体 */
|
||||
/* Windows 斜体遮挡添加 "Segoe UI" 字体 https://github.com/siyuan-note/siyuan/issues/11841 */
|
||||
--b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans", "Segoe UI", sans-serif, "Arial", "Tahoma", "Emojis";
|
||||
--b3-font-family-protyle: "Number Glyphs", "SiYuan Emojis", var(--b3-font-family);
|
||||
--b3-font-family-code: "Number Glyphs Of JetBrainsMono-Regular", "SiYuan Emojis", "JetBrainsMono-Regular", mononoki, Consolas, "Liberation Mono", Menlo, Courier, monospace, var(--b3-font-family);
|
||||
--b3-font-family-protyle: "Text Glyphs", "SiYuan Emojis", var(--b3-font-family);
|
||||
--b3-font-family-code: "Text Glyphs Of JetBrainsMono-Regular", "SiYuan Emojis", "JetBrainsMono-Regular", mononoki, Consolas, "Liberation Mono", Menlo, Courier, monospace, var(--b3-font-family);
|
||||
--b3-font-family-graph: arial;
|
||||
--b3-font-family-emoji: "SiYuan Emojis", "Emojis";
|
||||
--b3-font-family-math: KaTeX_Math;
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
/* 字体 */
|
||||
--b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans", "Segoe UI", sans-serif, "Arial", "Tahoma", "Emojis";
|
||||
--b3-font-family-protyle: "Number Glyphs", "SiYuan Emojis", var(--b3-font-family);
|
||||
--b3-font-family-code: "Number Glyphs Of JetBrainsMono-Regular", "SiYuan Emojis", "JetBrainsMono-Regular", mononoki, Consolas, "Liberation Mono", Menlo, Courier, monospace, var(--b3-font-family);
|
||||
--b3-font-family-protyle: "Text Glyphs", "SiYuan Emojis", var(--b3-font-family);
|
||||
--b3-font-family-code: "Text Glyphs Of JetBrainsMono-Regular", "SiYuan Emojis", "JetBrainsMono-Regular", mononoki, Consolas, "Liberation Mono", Menlo, Courier, monospace, var(--b3-font-family);
|
||||
--b3-font-family-graph: arial;
|
||||
--b3-font-family-emoji: "SiYuan Emojis", "Emojis";
|
||||
--b3-font-family-math: KaTeX_Math;
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Number Glyphs Of JetBrainsMono-Regular";
|
||||
font-family: "Text Glyphs Of JetBrainsMono-Regular";
|
||||
src: url(../fonts/JetBrainsMono-2.304/JetBrainsMono-Regular.woff2) format('woff2');
|
||||
/* 数字 0-9 */
|
||||
unicode-range: U+30-39;
|
||||
/* “按键”emoji 中的字符 # * 、数字 0-9 */
|
||||
unicode-range: U+23, U+2A, U+30-39;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
|
@ -204,14 +204,14 @@ export const setInlineStyle = (set = true) => {
|
|||
let style;
|
||||
if (window.siyuan.config.editor.fontFamily) {
|
||||
style = `@font-face {
|
||||
font-family: "Number Glyphs";
|
||||
font-family: "Text Glyphs";
|
||||
src: local("${window.siyuan.config.editor.fontFamily}");
|
||||
unicode-range: U+30-39;
|
||||
unicode-range: U+23, U+2A, U+30-39;
|
||||
}
|
||||
.b3-typography:not(.b3-typography--default), .protyle-wysiwyg, .protyle-title {font-family: "Number Glyphs", "SiYuan Emojis", "${window.siyuan.config.editor.fontFamily}", var(--b3-font-family-protyle)}`;
|
||||
.b3-typography:not(.b3-typography--default), .protyle-wysiwyg, .protyle-title {font-family: "Text Glyphs", "SiYuan Emojis", "${window.siyuan.config.editor.fontFamily}", var(--b3-font-family-protyle)}`;
|
||||
} else {
|
||||
style = `@font-face {
|
||||
font-family: "Number Glyphs";
|
||||
font-family: "Text Glyphs";
|
||||
src: local("Helvetica Neue"),
|
||||
local("Luxi Sans"),
|
||||
local("DejaVu Sans"),
|
||||
|
@ -219,7 +219,7 @@ export const setInlineStyle = (set = true) => {
|
|||
local("Segoe UI"),
|
||||
local("Microsoft Yahei"),
|
||||
local("sans-serif");
|
||||
unicode-range: U+30-39;
|
||||
unicode-range: U+23, U+2A, U+30-39;
|
||||
}`;
|
||||
}
|
||||
style += `.b3-typography, .protyle-wysiwyg, .protyle-title {font-size:${window.siyuan.config.editor.fontSize}px !important}
|
||||
|
|
Loading…
Add table
Reference in a new issue