drei
drei copied to clipboard
Use `Text3D` with already loaded font
Describe the feature you'd like:
I've already loaded a font using FontLoader, and I'd like to re-use it rather than fetching it again. However, Text3D doesn't have a way to pass the already loaded font, only a string URL.
Suggested implementation:
Either a new prop on Text3D, or extend the font: string | FontData prop to be font: string | FontData | Font
Sorry if I'm incorrect about something or just not using this properly!
i think the easiest/fastest would be if you add it https://github.com/pmndrs/drei/blob/master/src/core/Text3D.tsx
Text3D already supports FontData input. FontLoader.load results in a FontData object right? I’m not sure where your Font type comes from