update,
This commit is contained in:
@@ -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',
|
||||
},
|
||||
/** **************************************
|
||||
|
Reference in New Issue
Block a user