My webfonts are loaded using Webfontloader as shown below:
<script src="//ajax.googleapis.com/ajax/libs/webfont/1.5.10/webfont.js"></script>
<script>
WebFont.load({
custom: {
families: ['BlenderProBook', 'BlenderProMedium']
}
});
</script>
Initially, everything works perfectly when the page is first loaded. However, the issue arises when refreshing the page, as it only retrieves the cached fonts after they are requested in HTML and not before my ReactJS app starts running (when the Webfontloader usually fetches them). This timing doesn't work for me because I need to use these fonts in pre-generated SVG.
Is there a way to ensure that the uncached fonts are fetched every time? Alternatively, is there a method to load the cached fonts at the appropriate moment?