@@ -33,41 +33,74 @@ const interFontFaces = [
3333 ) ,
3434] ;
3535
36+ const notoSansSCFontFaces = [
37+ new FontFace (
38+ "NotoSansSC" ,
39+ `url(${ require ( "./public/assets/font/NatoSansSC-Regular.woff2" ) } )` ,
40+ {
41+ weight : "400" ,
42+ }
43+ ) ,
44+ new FontFace (
45+ "NotoSansSC" ,
46+ `url(${ require ( "./public/assets/font/NatoSansSC-Medium.woff2" ) } )` ,
47+ {
48+ weight : "500" ,
49+ }
50+ ) ,
51+ new FontFace (
52+ "NotoSansSC" ,
53+ `url(${ require ( "./public/assets/font/NatoSansSC-SemiBold.woff2" ) } )` ,
54+ {
55+ weight : "600" ,
56+ }
57+ ) ,
58+ new FontFace (
59+ "NotoSansSC" ,
60+ `url(${ require ( "./public/assets/font/NatoSansSC-Bold.woff2" ) } )` ,
61+ {
62+ weight : "700" ,
63+ }
64+ ) ,
65+ ] ;
66+
67+ const notoSansKRFontFaces = [
68+ new FontFace (
69+ "NotoSansKR" ,
70+ `url(${ require ( "./public/assets/font/NotoSansKR-Regular.woff2" ) } )` ,
71+ {
72+ weight : "400" ,
73+ }
74+ ) ,
75+ new FontFace (
76+ "NotoSansKR" ,
77+ `url(${ require ( "./public/assets/font/NotoSansKR-Medium.woff2" ) } )` ,
78+ {
79+ weight : "500" ,
80+ }
81+ ) ,
82+ new FontFace (
83+ "NotoSansKR" ,
84+ `url(${ require ( "./public/assets/font/NotoSansKR-Medium.woff2" ) } )` ,
85+ {
86+ weight : "600" ,
87+ }
88+ ) ,
89+ new FontFace (
90+ "NotoSansKR" ,
91+ `url(${ require ( "./public/assets/font/NotoSansKR-Bold.woff2" ) } )` ,
92+ {
93+ weight : "700" ,
94+ }
95+ ) ,
96+ ] ;
97+
3698const languageToFontFaces : {
3799 [ lang : string ] : FontFace [ ] | undefined ;
38100} = {
39101 en : interFontFaces ,
40- ko : [
41- ...interFontFaces ,
42- new FontFace (
43- "NotoSansKR" ,
44- `url(${ require ( "./public/assets/font/NotoSansKR-Regular.woff2" ) } )` ,
45- {
46- weight : "400" ,
47- }
48- ) ,
49- new FontFace (
50- "NotoSansKR" ,
51- `url(${ require ( "./public/assets/font/NotoSansKR-Medium.woff2" ) } )` ,
52- {
53- weight : "500" ,
54- }
55- ) ,
56- new FontFace (
57- "NotoSansKR" ,
58- `url(${ require ( "./public/assets/font/NotoSansKR-Medium.woff2" ) } )` ,
59- {
60- weight : "600" ,
61- }
62- ) ,
63- new FontFace (
64- "NotoSansKR" ,
65- `url(${ require ( "./public/assets/font/NotoSansKR-Bold.woff2" ) } )` ,
66- {
67- weight : "700" ,
68- }
69- ) ,
70- ] ,
102+ "zh-cn" : [ ...interFontFaces , ...notoSansSCFontFaces ] ,
103+ ko : [ ...interFontFaces , ...notoSansKRFontFaces ] ,
71104} ;
72105
73106export const useLoadFonts = ( ) => {
0 commit comments