@@ -40,6 +40,32 @@ const hebrewPath = nodeRequire.resolve("../../packages/hebrew/src/index.tsx");
4040const hijriPath = nodeRequire . resolve ( "../../packages/hijri/src/index.tsx" ) ;
4141const persianPath = nodeRequire . resolve ( "../../packages/persian/src/index.tsx" ) ;
4242
43+ const googleFontFamilies = [
44+ "Inter:wght@400;500;600;700" ,
45+ "Vazirmatn:wght@400;500;600;700" ,
46+ "Noto Sans:wght@400;500;600;700" ,
47+ "Noto Sans Armenian:wght@400;500;600;700" ,
48+ "Noto Sans Bengali:wght@400;500;600;700" ,
49+ "Noto Sans Devanagari:wght@400;500;600;700" ,
50+ "Noto Sans Ethiopic:wght@400;500;600;700" ,
51+ "Noto Sans Georgian:wght@400;500;600;700" ,
52+ "Noto Sans Gujarati:wght@400;500;600;700" ,
53+ "Noto Sans Hebrew:wght@400;500;600;700" ,
54+ "Noto Sans JP:wght@400;500;600;700" ,
55+ "Noto Sans KR:wght@400;500;600;700" ,
56+ "Noto Sans Kannada:wght@400;500;600;700" ,
57+ "Noto Sans Khmer:wght@400;500;600;700" ,
58+ "Noto Sans HK:wght@400;500;600;700" ,
59+ "Noto Sans SC:wght@400;500;600;700" ,
60+ "Noto Sans TC:wght@400;500;600;700" ,
61+ "Noto Sans Tamil:wght@400;500;600;700" ,
62+ "Noto Sans Telugu:wght@400;500;600;700" ,
63+ "Noto Sans Thai:wght@400;500;600;700" ,
64+ ] ;
65+ const googleFontsStylesheet = `https://fonts.googleapis.com/css2?${ googleFontFamilies
66+ . map ( ( family ) => `family=${ family . replace ( / / g, "+" ) } ` )
67+ . join ( "&" ) } &display=swap`;
68+
4369function createApiReferenceRedirects ( path : string ) : string [ ] {
4470 if ( path . startsWith ( "/api/react/" ) ) {
4571 return [ path . replace ( "/api/react/" , "/api/" ) ] ;
@@ -114,6 +140,7 @@ const config: Config = {
114140 customCss : [
115141 "../../packages/react-day-picker/src/style.css" ,
116142 "./src/css/site.css" ,
143+ "./src/css/daypicker-locale-fonts.css" ,
117144 ] ,
118145 } ,
119146 sitemap : {
@@ -133,9 +160,7 @@ const config: Config = {
133160 ] ,
134161
135162 // Modern font
136- stylesheets : [
137- "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" ,
138- ] ,
163+ stylesheets : [ googleFontsStylesheet ] ,
139164
140165 plugins : [
141166 function currentExamplesAliasPlugin ( ) {
0 commit comments