Closed SumitBando closed 2 years ago
For local development, downloading fonts from google cdn adds a flash due to font replacement.
This can be eliminated by using local fonts. Instead of adding the font reference in the css file, you can add them through package.json
"dependencies": { "@fontsource/neucha": "^4.5.0", "@fontsource/patrick-hand-sc": "^4.5.0", ... }
then in some source file: import '@fontsource/patrick-hand-sc'; import '@fontsource/neucha';
Fonts are loaded in papercss stylesheet.
For local development, downloading fonts from google cdn adds a flash due to font replacement.
This can be eliminated by using local fonts. Instead of adding the font reference in the css file, you can add them through package.json
"dependencies": { "@fontsource/neucha": "^4.5.0", "@fontsource/patrick-hand-sc": "^4.5.0", ... }
then in some source file: import '@fontsource/patrick-hand-sc'; import '@fontsource/neucha';