diff --git a/settings.yaml b/settings.yaml index 602c5cf..a50546a 100644 --- a/settings.yaml +++ b/settings.yaml @@ -28,6 +28,11 @@ spec: - group: style label: 样式设置 formSchema: + - $formkit: checkbox + label: 使用系统字体 + name: system_font + value: false + help: 开启后将优先使用访问者的系统字体 - $formkit: checkbox name: pixel_style label: 像素化风格 diff --git a/src/styles/main.scss b/src/styles/main.scss index 9e62828..9743550 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -15,8 +15,9 @@ --line-theme-height: calc(var(--font-theme-size) * 1.54); --radius-theme-default: 0; --font-theme-default: 'JetBrains Mono'; - --font-theme-fallback: Monaco, Consolas, -apple-system, BlinkMacSystemFont, 'segoe ui', - Roboto, Oxygen, Ubuntu, Cantarell, 'open sans', 'helvetica neue'; + --font-theme-fallback: -apple-system, BlinkMacSystemFont, 'segoe ui', Roboto, Oxygen, + Ubuntu, Cantarell, 'open sans', 'helvetica neue', Arial, 'Noto Sans', + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; --scrollbar-theme-width: thin; --scrollbar-theme-color: rgba(134, 134, 134, 0.45) rgba(255, 255, 255, 0); --font-theme-lig: none; @@ -31,6 +32,10 @@ html[pixel_style='true'] { --font-theme-default: 'Fusion Pixel 12px P zh_hans'; } +html[system_font='true']:not([pixel_style='true']) { + --font-theme-default: var(--font-theme-fallback); +} + * { scrollbar-width: var(--scrollbar-theme-width) !important; scrollbar-color: var(--scrollbar-theme-color); diff --git a/templates/modules/layout.html b/templates/modules/layout.html index 6993204..2c9f66a 100644 --- a/templates/modules/layout.html +++ b/templates/modules/layout.html @@ -8,6 +8,10 @@ +