#How to Custom Font Uploaded by User?

9 messages · Page 1 of 1 (latest)

flint kernel
#

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.

cold drumBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

flint kernel
#

wait so local fonts dont have to point to a local file?

modern oriole
#

u can prompt the user to select from a list of fonts

flint kernel
#

But what if the user uploads a custom font?

modern oriole
#

so u could have something like this:
/cdn/user/<id>/<fontuploadid>/<fontid>.woff2

#

and u proxy the cdn to your desired storage service