mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
move fonts to assets folder
This commit is contained in:
parent
bd26967ff2
commit
c429ac9223
18 changed files with 32 additions and 32 deletions
BIN
assets/fonts/NotoSansJP-VariableFont_wght.ttf
Normal file
BIN
assets/fonts/NotoSansJP-VariableFont_wght.ttf
Normal file
Binary file not shown.
|
|
@ -50,7 +50,10 @@ export const useAppTheme = (overrideTheme?: AppTheme) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (type === FontType.SYSTEM && system) {
|
if (type === FontType.SYSTEM && system) {
|
||||||
const root = document.documentElement;
|
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) {
|
if (!textStyleRef.current) {
|
||||||
textStyleRef.current = document.createElement('style');
|
textStyleRef.current = document.createElement('style');
|
||||||
|
|
@ -64,7 +67,10 @@ export const useAppTheme = (overrideTheme?: AppTheme) => {
|
||||||
}`;
|
}`;
|
||||||
} else if (type === FontType.CUSTOM && custom) {
|
} else if (type === FontType.CUSTOM && custom) {
|
||||||
const root = document.documentElement;
|
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) {
|
if (!textStyleRef.current) {
|
||||||
textStyleRef.current = document.createElement('style');
|
textStyleRef.current = document.createElement('style');
|
||||||
|
|
@ -78,7 +84,10 @@ export const useAppTheme = (overrideTheme?: AppTheme) => {
|
||||||
}`;
|
}`;
|
||||||
} else {
|
} else {
|
||||||
const root = document.documentElement;
|
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]);
|
}, [builtIn, custom, system, type]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
text-rendering: optimizelegibility;
|
text-rendering: optimizelegibility;
|
||||||
-webkit-tap-highlight-color: rgb(0 0 0 / 0%);
|
-webkit-tap-highlight-color: rgb(0 0 0 / 0%);
|
||||||
text-size-adjust: none;
|
text-size-adjust: none;
|
||||||
outline: none;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|
@ -122,59 +123,56 @@ button {
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: Archivo;
|
font-family: Archivo;
|
||||||
font-weight: 100 1000;
|
font-weight: 100 1000;
|
||||||
src: url('../../renderer/fonts/Archivo-VariableFont_wdth,wght.ttf')
|
src: url('../../../assets/fonts/Archivo-VariableFont_wdth,wght.ttf');
|
||||||
format('truetype-variations');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: Raleway;
|
font-family: Raleway;
|
||||||
font-weight: 100 1000;
|
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-face {
|
||||||
font-family: Fredoka;
|
font-family: Fredoka;
|
||||||
font-weight: 100 1000;
|
font-weight: 100 1000;
|
||||||
src: url('../../renderer/fonts/Fredoka-VariableFont_wdth,wght.ttf')
|
src: url('../../../assets/fonts/Fredoka-VariableFont_wdth,wght.ttf');
|
||||||
format('truetype-variations');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'League Spartan';
|
font-family: 'League Spartan';
|
||||||
font-weight: 100 1000;
|
font-weight: 100 1000;
|
||||||
src: url('../../renderer/fonts/LeagueSpartan-VariableFont_wght.ttf')
|
src: url('../../../assets/fonts/LeagueSpartan-VariableFont_wght.ttf');
|
||||||
format('truetype-variations');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: Lexend;
|
font-family: Lexend;
|
||||||
font-weight: 100 1000;
|
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-face {
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-weight: 100 1000;
|
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-face {
|
||||||
font-family: Sora;
|
font-family: Sora;
|
||||||
font-weight: 100 1000;
|
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-face {
|
||||||
font-family: 'Work Sans';
|
font-family: 'Work Sans';
|
||||||
font-weight: 100 1000;
|
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-face {
|
||||||
font-family: Poppins;
|
font-family: Poppins;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: url('../../renderer/fonts/Poppins-Regular.ttf') format('truetype');
|
src: url('../../../assets/fonts/Poppins-Regular.ttf');
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -182,7 +180,7 @@ button {
|
||||||
font-family: Poppins;
|
font-family: Poppins;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
src: url('../../renderer/fonts/Poppins-SemiBold.ttf') format('truetype');
|
src: url('../../../assets/fonts/Poppins-SemiBold.ttf');
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -190,7 +188,7 @@ button {
|
||||||
font-family: Poppins;
|
font-family: Poppins;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
src: url('../../renderer/fonts/Poppins-Bold.ttf') format('truetype');
|
src: url('../../../assets/fonts/Poppins-Bold.ttf');
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -198,7 +196,7 @@ button {
|
||||||
font-family: Poppins;
|
font-family: Poppins;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
src: url('../../renderer/fonts/Poppins-ExtraBold.ttf') format('truetype');
|
src: url('../../../assets/fonts/Poppins-ExtraBold.ttf');
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -206,28 +204,21 @@ button {
|
||||||
font-family: Poppins;
|
font-family: Poppins;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
src: url('../../renderer/fonts/Poppins-Black.ttf') format('truetype');
|
src: url('../../../assets/fonts/Poppins-Black.ttf');
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: Raleway;
|
font-family: Raleway;
|
||||||
font-weight: 100 1000;
|
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-face {
|
||||||
font-family: DroidSerif;
|
font-family: 'Noto Sans JP';
|
||||||
src: url('https://rawgit.com/google/fonts/master/ufl/ubuntumono/UbuntuMono-Italic.ttf')
|
font-weight: 100 900;
|
||||||
format('truetype');
|
src: url('../../../assets/fonts/NotoSansJP-VariableFont_wght.ttf');
|
||||||
unicode-range: U+000-5FF; /* Latin glyphs */
|
unicode-range: U+3000-9FFF, U+FF00-FFEF; /* Japanese characters */
|
||||||
}
|
|
||||||
|
|
||||||
@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 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue