fix: improve mac font fallback for dashboard text

This commit is contained in:
邹永赫
2026-02-10 09:25:43 +09:00
parent 1702ef25e2
commit 38e74ec3ae
4 changed files with 15 additions and 5 deletions

View File

@@ -269,7 +269,7 @@ export default {
}
}
span.style = style + 'display: block; font-size: 12px; font-family: Consolas, monospace; white-space: pre-wrap; margin-bottom: 2px;'
span.style = style + 'display: block; font-size: 12px; font-family: SFMono-Regular, Menlo, Monaco, Consolas, "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", monospace; white-space: pre-wrap; margin-bottom: 2px;'
span.classList.add('fade-in')
span.innerText = `${log}`;
ele.appendChild(span)

View File

@@ -9,7 +9,7 @@ $color-pack: false;
// Global font size and border radius
$font-size-root: 1rem;
$border-radius-root: 8px;
$body-font-family: 'Roboto', sans-serif !default;
$body-font-family: 'Roboto', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif !default;
$heading-font-family: $body-font-family !default;
$btn-font-weight: 400 !default;
$btn-letter-spacing: 0 !default;

View File

@@ -85,15 +85,15 @@ $sizes: (
body {
.Poppins {
font-family: 'Poppins', sans-serif !important;
font-family: 'Poppins', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif !important;
}
.Inter {
font-family: 'Inter', sans-serif !important;
font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif !important;
}
.Outfit {
font-family: 'Outfit', sans-serif !important;
font-family: 'Outfit', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif !important;
}
}

View File

@@ -161,6 +161,16 @@ function createWindow() {
nodeIntegration: false,
sandbox: true,
preload: path.join(__dirname, 'preload.js'),
...(isMac
? {
defaultFontFamily: {
standard: 'PingFang SC',
sansSerif: 'PingFang SC',
serif: 'Songti SC',
monospace: 'SF Mono',
},
}
: {}),
},
});