How do you add custom fonts to plugins?

I’m working on a custom rich text editor plugin and would like to be able to use custom fonts inside the editor that match what the users will be seeing on the website. I’ve tried importing them via the main plugin file but I keep getting these errors in the console:

Failed to decode downloaded font: <URL>
OTS parsing error: invalid version tag

Any ideas on how to fix the issue? Is this even possible or will I need to upgrade my subscription plan?

Hi @buchansm ,

Can you provide sample plugin code here, in a github gist, or a codesandbox? It will help us debug your issue.