-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
TextGeometry creates incorrect geometry using TTF Google Fonts #24291
Comments
It seems the issue can be fixed by updating The issue is that the loaded font defines contours and holes in a way such that |
|
@Mugen87 thanks so much for looking into this so quickly! Sorry, I'm new to Three.js. I grabbed the patched version of SVGLoader.js, but what specific changes do I make to the FontLoader.js file? I found this on line 75: But |
It should be: shapes.push( ...SVGLoader.createShapes( paths[ p ] ) ); |
@Mugen87 that worked after I imported the patched SVGLoader. Thanks! |
Loading a TTF Google Font with TTFLoader and creating geometry using TextGeometry creates inverted normals and negative spaces on characters that have counter forms (such as "o", "e", "g", etc.) in the resulting mesh (see screenshot below):
To Reproduce
Steps to reproduce the behavior:
Code
Live example
https://jsfiddle.net/u82Lmn4e/12/
Expected behavior
The letter normals should be calculated correctly outside and the counter form should be hollow instead of filled.
Screenshots
Platform:
The text was updated successfully, but these errors were encountered: