From b3381c6448bbbdac37f86fa2a252bd407be02fa5 Mon Sep 17 00:00:00 2001 From: Midwich Date: Sat, 16 May 2026 18:03:13 +0400 Subject: [PATCH] fix(webui): add Noto Sans to global font-family stack for Cyrillic text (#8205) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #8015 added 'Noto Sans' to the Google Fonts link and CJK fallback list, but the font was placed at the end of $cjk-sans-fallback where browsers never reach it for Cyrillic text. The global $body-font-family also lacked 'Outfit' entirely, causing Vuetify to use CJK fonts as the primary face. Changes: - Remove 'Noto Sans' from the end of $cjk-sans-fallback (it is not a CJK font) - Add 'Outfit' and 'Noto Sans' to $body-font-family before CJK fallbacks - Update .Outfit class in _container.scss to match the new stack This ensures: - Latin text → Outfit - Cyrillic text → Noto Sans (loaded by vite-plugin-webfont-dl) - CJK text → Noto Sans SC / PingFang SC etc. Fixes follow-up to #8015. --- dashboard/src/scss/_variables.scss | 4 ++-- dashboard/src/scss/layout/_container.scss | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/src/scss/_variables.scss b/dashboard/src/scss/_variables.scss index 5e5bfe97a..8fb01767f 100644 --- a/dashboard/src/scss/_variables.scss +++ b/dashboard/src/scss/_variables.scss @@ -9,7 +9,7 @@ $color-pack: false; // Global font size and border radius $font-size-root: 1rem; $border-radius-root: 8px; -$cjk-sans-fallback: 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', 'Noto Sans SC', 'Noto Sans' !default; +$cjk-sans-fallback: 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', 'Noto Sans SC' !default; $cjk-mono-fallback: 'PingFang SC', 'PingFang TC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei' !default; $code-text-color: #111827 !default; @@ -19,7 +19,7 @@ $code-text-color: #111827 !default; --astrbot-code-color: #{$code-text-color}; } -$body-font-family: $cjk-sans-fallback, sans-serif !default; +$body-font-family: 'Outfit', 'Noto Sans', $cjk-sans-fallback, sans-serif !default; $heading-font-family: $body-font-family !default; $btn-font-weight: 400 !default; $btn-letter-spacing: 0 !default; diff --git a/dashboard/src/scss/layout/_container.scss b/dashboard/src/scss/layout/_container.scss index c6a1c00c9..c2e71b843 100644 --- a/dashboard/src/scss/layout/_container.scss +++ b/dashboard/src/scss/layout/_container.scss @@ -80,7 +80,7 @@ $sizes: ( body { .Outfit { - font-family: 'Outfit', $cjk-sans-fallback, sans-serif !important; + font-family: $body-font-family !important; } }