feat(settings): add font family selector in Appearance
- Add 4 bundled fonts: Montserrat, Noto Sans, Source Sans 3, plus existing LINE Seed JP (default) and System fallback - Font selector dropdown in Settings > Appearance, after Language - Persisted in localStorage, applied on app bootstrap via data-font attribute on <html> which overrides --font-sans CSS variable - @font-face declarations for variable font files in static/fonts/ - i18n key "fontFamily" added to all 4 locales
This commit is contained in:
13 files changed
+105
-1
No files matched your search
+44
@@ -1,5 +1,35 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400&family=LINE+Seed+JP:wght@400;700&family=Oswald:wght@400;500;600;700&display=swap');
|
||||
|
||||
/* Bundled fonts */
|
||||
@font-face {
|
||||
font-family: 'Montserrat';
|
||||
src: url('/fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Noto Sans';
|
||||
src: url('/fonts/NotoSans-VariableFont_wdth,wght.ttf') format('truetype');
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Noto Sans';
|
||||
src: url('/fonts/NotoSans-Italic-VariableFont_wdth,wght.ttf') format('truetype');
|
||||
font-weight: 100 900;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Source Sans 3';
|
||||
src: url('/fonts/SourceSans3-VariableFont_wght.ttf') format('truetype');
|
||||
font-weight: 200 900;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
:root {
|
||||
/* QBZ Dark Theme Colors */
|
||||
--bg-primary: #0f0f0f;
|
||||
@@ -71,6 +101,20 @@
|
||||
--font-mono: 'JetBrains Mono', monospace;
|
||||
}
|
||||
|
||||
/* Font overrides */
|
||||
[data-font="montserrat"] {
|
||||
--font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
||||
}
|
||||
[data-font="noto-sans"] {
|
||||
--font-sans: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
||||
}
|
||||
[data-font="source-sans-3"] {
|
||||
--font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
||||
}
|
||||
[data-font="system"] {
|
||||
--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
||||
}
|
||||
|
||||
/* Light Theme */
|
||||
[data-theme="light"] {
|
||||
--bg-primary: #ffffff;
|
||||
|
||||
Reference in new issue
Block a user