-
Notifications
You must be signed in to change notification settings - Fork 444
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
Support configure font style in scene #179
Comments
@syt123450 So I did a bit of digging on this after setting up a local instance of tensor (fixed a bug with missing dep aswell). I found the hard coded font and saw that there is an npm module for this specific font already (https://www.npmjs.com/package/three.regular.helvetiker). The rollup config didn't have common module and ES6 external resolver support so I added that into the build aswell. That at least trims down that giant line of json into one easy import. Still looking at the best way to pass through the option without rewriting too much function calls, but looks doable. |
@Truemedia It's really a good news! I think this refactoring will highly improve the TensorSpace's source code readability. Could you send a PR related your refactoring? |
@BoTime Could you give some suggestions about rollup configuration? |
@syt123450 Sure, would you be able to open a feature branch/develop branch for me to do a new request on so it doesn't go into master just yet. |
Hi @Truemedia , I created a new issue #192 and create a new branch refactorfont. We can work under the new issue for refactoring, separate the work of refactor and new feature ~ |
@syt123450 Ok cool, I won't have much time to commit any code during week but weekend can probably box off both those branches with the new features |
TensorSpace use
fonts/helvetiker_regular.typeface.json
as the basic font style foroutput1d
layer text information. However, it does not support some text, for example, when input中文
, thefonts/helvetiker_regular.typeface.json
will show??
(this case can be reproduced in three.js docs's playground).To handle this case, add a configuration in model, user can override the default
fonts/helvetiker_regular.typeface.json
with own fonts.For example:
The text was updated successfully, but these errors were encountered: