E
E
Evdokim2021-09-12 14:53:27
React
Evdokim, 2021-09-12 14:53:27

How to mount (run) the application in a React project only after downloading all the fonts from Google Fonts?

There was a situation when the SPA page "twitches" after loading all Google fonts.
Is there any modern webpack plugin or library that could solve the problem?

Let's say that my application is mounted and initialized only after all fonts are loaded.

Or so that the webpack plugin can prepare the fonts for download in advance.

Please share your experience. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Gurtovoy, 2021-09-13
@jt3k

https://developer.mozilla.org/en-US/docs/Web/API/F...
Here is the solution. But you will have to manually write the expected fonts
+ this is an experimental technology, do not forget about the polyfill

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question