React + Electron: Dynamically load user-provided fonts?

Viewed 719

I'm making an Electron + React app, where the user should be able to provide his own fonts. Basically the user would put the fonts he wants to use in a folder next to the executable, and then the executable will read the folder and make those fonts useable.

Is this possible to do? All I could find was has to define custom fonts when I already know of their existence beforehand. But I don't.

So if this is possible, how?

Thanks!

1 Answers
Related