This commit is contained in:
louiscklaw
2025-05-28 21:06:04 +08:00
parent e7b292338b
commit 4007227418
3 changed files with 30 additions and 9 deletions

View File

@@ -1,7 +1,6 @@
import type { CommonColors } from '@mui/material/styles';
import type { PaletteColorNoChannels } from './core/palette';
import type { ThemeDirection, ThemeColorScheme, ThemeCssVariables } from './types';
import type { ThemeColorScheme, ThemeCssVariables, ThemeDirection } from './types';
// ----------------------------------------------------------------------
@@ -25,6 +24,12 @@ type ThemeConfig = {
};
};
const navigator_language = navigator.language;
let primaryFont = 'Noto Sans TC Variable';
if (navigator_language.startsWith('zh')) primaryFont = 'Noto Sans TC Variable';
if (navigator_language.startsWith('sc')) primaryFont = 'Noto Sans SC Variable';
if (navigator_language.startsWith('jp')) primaryFont = 'Noto Sans JP Variable';
export const themeConfig: ThemeConfig = {
/** **************************************
* Base
@@ -38,7 +43,12 @@ export const themeConfig: ThemeConfig = {
* Typography
*************************************** */
fontFamily: {
primary: 'Public Sans Variable',
// primary: 'Public Sans Variable',
// added fontsource-variable fonts src/global.css
primary: primaryFont,
//
secondary: 'Barlow',
},
/** **************************************