Google Fonts is a free font service used on various websites, but loading many fonts at the same time can affect page loading speed. Therefore, methods to improve page loading speed are required.
One such method is the use of the Web Font Loader, a JavaScript library jointly developed by Google and Typekit that allows asynchronous loading of web fonts. This prevents web font loading from blocking page rendering and improves loading speed.
Below is a basic method of loading Google Fonts using the Web Font Loader.
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
<script>
WebFont. load({
google: {
families: ['Droid Sans', 'Droid Serif']
}
});
</script>
For more information, please see the following reference links
How to make Google Fonts display faster