-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using TTFLoader
in useFont
#2303
base: master
Are you sure you want to change the base?
Conversation
* Fix useFont example in docs * Remove unused imports from Text3D * Use TTFLoader in useFont * Update documentation for Text3D * Add story for Text3D using TTFLoader * ttf font --------- Co-authored-by: Antoine BERNIER <[email protected]>
To avoid a breaking change, this only uses `TTFLoader` when the `ttfLoader` argument of `useFont` is set to `true`.
@mz8i is attempting to deploy a commit to the Poimandres Team on Vercel. A member of the Team first needs to authorize it. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Why wasn't feature detection in #2095 done by looking at the file extension? |
Originally I thought detecting based on MIME type would be more generic. But I removed the detection anyway - correct me if I'm wrong, but I think any sort of detection would potentially be a breaking change for users who rely on the hook to always apply |
Resolves #2094
(this is a second PR after #2095 got reverted to avoid a breaking change).
In comparison to the previous PR, the code here does not try to automatically determine if
TTFLoader
should be used.It is only enabled manually through the second argument to
useFont
.Additional considerations:
reversed
option toTTFLoader
, which is required to correctly parse some font files. Suggestions for the cleanest API here are welcome.preload
andclear
functions foruseFont
in the case whereuseFont
has more than one argument.Why
What
Checklist