pmndrs / drei

🥉 useful helpers for react-three-fiber
https://docs.pmnd.rs/drei
MIT License
8.28k stars 682 forks source link

Can I use a local font file path for fontUrl? Or even system fonts #1415

Open Kelier opened 1 year ago

Kelier commented 1 year ago

What is your question:

<Text font={'cursive'} />
or 
<Text font={localPath} />

It didn't work for me.What could be the possible reasons for this issue?

jpwhitaker commented 1 year ago

Font takes a URL: https://protectwise.github.io/troika/troika-three-text/#preloading

You could move your font file to your public folder and use reference it like this: font={"./Roboto-Regular.ttf"}

Kelier commented 1 year ago

Font takes a URL: https://protectwise.github.io/troika/troika-three-text/#preloading

You could move your font file to your public folder and use reference it like this: font={"./Roboto-Regular.ttf"}

thanks a lot!