How to Custom Font Uploaded by User?
Unanswered
Sun bear posted this in #help-forum
Sun bearOP
Hi all, sorry if this is addressed somewhere, but I read the nextjs docs on next/fonts and didnt really think it addressed my usecase.
I want users to be able to upload a custom font to cloud storage then use that font for their account only. How would I do this with next/font?
It appears that all the documentation addresses adding a custom font at build, but is there away to incorporate a custom font at runtime and at page load?
Thanks in advance.
I want users to be able to upload a custom font to cloud storage then use that font for their account only. How would I do this with next/font?
It appears that all the documentation addresses adding a custom font at build, but is there away to incorporate a custom font at runtime and at page load?
Thanks in advance.
8 Replies
Sun bearOP
wait so local fonts dont have to point to a local file?
u can prompt the user to select from a list of fonts
Sun bearOP
But what if the user uploads a custom font?
@Sun bear But what if the user uploads a custom font?
u should be able to specify the url as src
so u could have something like this:
/cdn/user/<id>/<fontuploadid>/<fontid>.woff2
/cdn/user/<id>/<fontuploadid>/<fontid>.woff2
and u proxy the cdn to your desired storage service
otherwise just inject the font using <Head/>