I am using react-p5-wrapper npm module to use p5 sketches inside my react based portfolio site.
While it works pretty fine, I got stuck in loadFonts.
As per the example and documentation, in preload function loadFonts(‘your_font_name.ttf/otf’) should work. But it is always giving me errors. It is saying problem loading the font and unsupported OpenType signature.
I tried to console.log the font inside the preload function and since it is not loading, it is coming as undefined.
Attaching the screenshot of the error.
Any help to resolve this issue would be highly appreciated.