You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to make an svg based image generator, I tried many libraries and variants and realized that sharp generates them extremely fast, but I have some problems, for example now I'm dealing with fonts, because I want the user to choose the font he needs, for example from google fonts (I know woff2 is not supported, I'll solve it later, it's not critical), the user will pass its name to URLSearchParams and I don't know how to do it correctly. Can I load the fonts on the fly while the code is running?
I have the following code, if you execute it like this, you won't get the font you need, if you uncomment and restart it, everything works, the fonts are there. But I tried to wrap it in an if statement like this:
Hi, I'm trying to make an svg based image generator, I tried many libraries and variants and realized that sharp generates them extremely fast, but I have some problems, for example now I'm dealing with fonts, because I want the user to choose the font he needs, for example from google fonts (I know woff2 is not supported, I'll solve it later, it's not critical), the user will pass its name to URLSearchParams and I don't know how to do it correctly. Can I load the fonts on the fly while the code is running?
I have the following code, if you execute it like this, you won't get the font you need, if you uncomment and restart it, everything works, the fonts are there. But I tried to wrap it in an if statement like this:
then it won't work that way anymore, i.e. it's impossible to set the font while the code is running, right? Or is there a hack? Help me, please!
The text was updated successfully, but these errors were encountered: