diff --git a/src/renderer/fonts/Archivo-VariableFont_wdth,wght.ttf b/assets/fonts/Archivo-VariableFont_wdth,wght.ttf similarity index 100% rename from src/renderer/fonts/Archivo-VariableFont_wdth,wght.ttf rename to assets/fonts/Archivo-VariableFont_wdth,wght.ttf diff --git a/src/renderer/fonts/Fredoka-VariableFont_wdth,wght.ttf b/assets/fonts/Fredoka-VariableFont_wdth,wght.ttf similarity index 100% rename from src/renderer/fonts/Fredoka-VariableFont_wdth,wght.ttf rename to assets/fonts/Fredoka-VariableFont_wdth,wght.ttf diff --git a/src/renderer/fonts/Inter-VariableFont_slnt,wght.ttf b/assets/fonts/Inter-VariableFont_slnt,wght.ttf similarity index 100% rename from src/renderer/fonts/Inter-VariableFont_slnt,wght.ttf rename to assets/fonts/Inter-VariableFont_slnt,wght.ttf diff --git a/src/renderer/fonts/LeagueSpartan-VariableFont_wght.ttf b/assets/fonts/LeagueSpartan-VariableFont_wght.ttf similarity index 100% rename from src/renderer/fonts/LeagueSpartan-VariableFont_wght.ttf rename to assets/fonts/LeagueSpartan-VariableFont_wght.ttf diff --git a/src/renderer/fonts/Lexend-VariableFont_wght.ttf b/assets/fonts/Lexend-VariableFont_wght.ttf similarity index 100% rename from src/renderer/fonts/Lexend-VariableFont_wght.ttf rename to assets/fonts/Lexend-VariableFont_wght.ttf diff --git a/assets/fonts/NotoSansJP-VariableFont_wght.ttf b/assets/fonts/NotoSansJP-VariableFont_wght.ttf new file mode 100644 index 00000000..4769abcc Binary files /dev/null and b/assets/fonts/NotoSansJP-VariableFont_wght.ttf differ diff --git a/src/renderer/fonts/Poppins-Black.ttf b/assets/fonts/Poppins-Black.ttf similarity index 100% rename from src/renderer/fonts/Poppins-Black.ttf rename to assets/fonts/Poppins-Black.ttf diff --git a/src/renderer/fonts/Poppins-Bold.ttf b/assets/fonts/Poppins-Bold.ttf similarity index 100% rename from src/renderer/fonts/Poppins-Bold.ttf rename to assets/fonts/Poppins-Bold.ttf diff --git a/src/renderer/fonts/Poppins-ExtraBold.ttf b/assets/fonts/Poppins-ExtraBold.ttf similarity index 100% rename from src/renderer/fonts/Poppins-ExtraBold.ttf rename to assets/fonts/Poppins-ExtraBold.ttf diff --git a/src/renderer/fonts/Poppins-Italic.ttf b/assets/fonts/Poppins-Italic.ttf similarity index 100% rename from src/renderer/fonts/Poppins-Italic.ttf rename to assets/fonts/Poppins-Italic.ttf diff --git a/src/renderer/fonts/Poppins-Light.ttf b/assets/fonts/Poppins-Light.ttf similarity index 100% rename from src/renderer/fonts/Poppins-Light.ttf rename to assets/fonts/Poppins-Light.ttf diff --git a/src/renderer/fonts/Poppins-Regular.ttf b/assets/fonts/Poppins-Regular.ttf similarity index 100% rename from src/renderer/fonts/Poppins-Regular.ttf rename to assets/fonts/Poppins-Regular.ttf diff --git a/src/renderer/fonts/Poppins-SemiBold.ttf b/assets/fonts/Poppins-SemiBold.ttf similarity index 100% rename from src/renderer/fonts/Poppins-SemiBold.ttf rename to assets/fonts/Poppins-SemiBold.ttf diff --git a/src/renderer/fonts/Raleway-VariableFont_wght.ttf b/assets/fonts/Raleway-VariableFont_wght.ttf similarity index 100% rename from src/renderer/fonts/Raleway-VariableFont_wght.ttf rename to assets/fonts/Raleway-VariableFont_wght.ttf diff --git a/src/renderer/fonts/Sora-VariableFont_wght.ttf b/assets/fonts/Sora-VariableFont_wght.ttf similarity index 100% rename from src/renderer/fonts/Sora-VariableFont_wght.ttf rename to assets/fonts/Sora-VariableFont_wght.ttf diff --git a/src/renderer/fonts/WorkSans-VariableFont_wght.ttf b/assets/fonts/WorkSans-VariableFont_wght.ttf similarity index 100% rename from src/renderer/fonts/WorkSans-VariableFont_wght.ttf rename to assets/fonts/WorkSans-VariableFont_wght.ttf diff --git a/src/renderer/themes/use-app-theme.ts b/src/renderer/themes/use-app-theme.ts index 7b950f3d..f9db76bb 100644 --- a/src/renderer/themes/use-app-theme.ts +++ b/src/renderer/themes/use-app-theme.ts @@ -50,7 +50,10 @@ export const useAppTheme = (overrideTheme?: AppTheme) => { useEffect(() => { if (type === FontType.SYSTEM && system) { const root = document.documentElement; - root.style.setProperty('--theme-content-font-family', 'dynamic-font'); + root.style.setProperty( + '--theme-content-font-family', + 'dynamic-font, "Noto Sans JP", sans-serif', + ); if (!textStyleRef.current) { textStyleRef.current = document.createElement('style'); @@ -64,7 +67,10 @@ export const useAppTheme = (overrideTheme?: AppTheme) => { }`; } else if (type === FontType.CUSTOM && custom) { const root = document.documentElement; - root.style.setProperty('--theme-content-font-family', 'dynamic-font'); + root.style.setProperty( + '--theme-content-font-family', + 'dynamic-font, "Noto Sans JP", sans-serif', + ); if (!textStyleRef.current) { textStyleRef.current = document.createElement('style'); @@ -78,7 +84,10 @@ export const useAppTheme = (overrideTheme?: AppTheme) => { }`; } else { const root = document.documentElement; - root.style.setProperty('--theme-content-font-family', builtIn); + root.style.setProperty( + '--theme-content-font-family', + `${builtIn}, "Noto Sans JP", sans-serif`, + ); } }, [builtIn, custom, system, type]); diff --git a/src/shared/styles/global.css b/src/shared/styles/global.css index 8b11a4f0..c9de9195 100644 --- a/src/shared/styles/global.css +++ b/src/shared/styles/global.css @@ -11,7 +11,8 @@ text-rendering: optimizelegibility; -webkit-tap-highlight-color: rgb(0 0 0 / 0%); text-size-adjust: none; - outline: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } body { @@ -122,59 +123,56 @@ button { @font-face { font-family: Archivo; font-weight: 100 1000; - src: url('../../renderer/fonts/Archivo-VariableFont_wdth,wght.ttf') - format('truetype-variations'); + src: url('../../../assets/fonts/Archivo-VariableFont_wdth,wght.ttf'); } @font-face { font-family: Raleway; font-weight: 100 1000; - src: url('../../renderer/fonts/Raleway-VariableFont_wght.ttf') format('truetype-variations'); + src: url('../../../assets/fonts/Raleway-VariableFont_wght.ttf'); } @font-face { font-family: Fredoka; font-weight: 100 1000; - src: url('../../renderer/fonts/Fredoka-VariableFont_wdth,wght.ttf') - format('truetype-variations'); + src: url('../../../assets/fonts/Fredoka-VariableFont_wdth,wght.ttf'); } @font-face { font-family: 'League Spartan'; font-weight: 100 1000; - src: url('../../renderer/fonts/LeagueSpartan-VariableFont_wght.ttf') - format('truetype-variations'); + src: url('../../../assets/fonts/LeagueSpartan-VariableFont_wght.ttf'); } @font-face { font-family: Lexend; font-weight: 100 1000; - src: url('../../renderer/fonts/Lexend-VariableFont_wght.ttf') format('truetype-variations'); + src: url('../../../assets/fonts/Lexend-VariableFont_wght.ttf'); } @font-face { font-family: Inter; font-weight: 100 1000; - src: url('../../renderer/fonts/Inter-VariableFont_slnt,wght.ttf') format('truetype-variations'); + src: url('../../../assets/fonts/Inter-VariableFont_slnt,wght.ttf'); } @font-face { font-family: Sora; font-weight: 100 1000; - src: url('../../renderer/fonts/Sora-VariableFont_wght.ttf') format('truetype-variations'); + src: url('../../../assets/fonts/Sora-VariableFont_wght.ttf'); } @font-face { font-family: 'Work Sans'; font-weight: 100 1000; - src: url('../../renderer/fonts/WorkSans-VariableFont_wght.ttf') format('truetype-variations'); + src: url('../../../assets/fonts/WorkSans-VariableFont_wght.ttf'); } @font-face { font-family: Poppins; font-style: normal; font-weight: 400; - src: url('../../renderer/fonts/Poppins-Regular.ttf') format('truetype'); + src: url('../../../assets/fonts/Poppins-Regular.ttf'); font-display: swap; } @@ -182,7 +180,7 @@ button { font-family: Poppins; font-style: normal; font-weight: 600; - src: url('../../renderer/fonts/Poppins-SemiBold.ttf') format('truetype'); + src: url('../../../assets/fonts/Poppins-SemiBold.ttf'); font-display: swap; } @@ -190,7 +188,7 @@ button { font-family: Poppins; font-style: normal; font-weight: 700; - src: url('../../renderer/fonts/Poppins-Bold.ttf') format('truetype'); + src: url('../../../assets/fonts/Poppins-Bold.ttf'); font-display: swap; } @@ -198,7 +196,7 @@ button { font-family: Poppins; font-style: normal; font-weight: 800; - src: url('../../renderer/fonts/Poppins-ExtraBold.ttf') format('truetype'); + src: url('../../../assets/fonts/Poppins-ExtraBold.ttf'); font-display: swap; } @@ -206,28 +204,21 @@ button { font-family: Poppins; font-style: normal; font-weight: 900; - src: url('../../renderer/fonts/Poppins-Black.ttf') format('truetype'); + src: url('../../../assets/fonts/Poppins-Black.ttf'); font-display: swap; } @font-face { font-family: Raleway; font-weight: 100 1000; - src: url('../../renderer/fonts/Raleway-VariableFont_wght.ttf') format('truetype-variations'); + src: url('../../../assets/fonts/Raleway-VariableFont_wght.ttf'); } @font-face { - font-family: DroidSerif; - src: url('https://rawgit.com/google/fonts/master/ufl/ubuntumono/UbuntuMono-Italic.ttf') - format('truetype'); - unicode-range: U+000-5FF; /* Latin glyphs */ -} - -@font-face { - font-family: DroidSerif; - src: url('https://fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Regular.woff2') - format('truetype'); - unicode-range: U+3000-9FFF, U+ff??; /* Japanese glyphs */ + font-family: 'Noto Sans JP'; + font-weight: 100 900; + src: url('../../../assets/fonts/NotoSansJP-VariableFont_wght.ttf'); + unicode-range: U+3000-9FFF, U+FF00-FFEF; /* Japanese characters */ } :root {