-
Notifications
You must be signed in to change notification settings - Fork 125
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
Inline Text #65
Comments
Thanks for the question, it's a good one. The answer is currently: Yes, but it's not documented, and you can only change colors. So you can't mix different fonts, font weights, or sizes. I definitely want to expand that capability in the future, so I'll leave this issue open as a feature request for tracking. See here for how you'd use the current color support, noting that its API isn't frozen yet:
So something like |
Awesome! I already saw the colorRange prop .. good to know that this will be the way to go for other inline styles, too .. thank you! |
…t by unicode range - #13 Mimics how CSS @font-face resolves across multiple fonts by unicode-range, only loading those font files needed for the characters actually used. This allows for more complete language coverage without having to include everything in one font file, and Latin text can now load a smaller font file by default. The support is currently limited to an internal set of fallback fonts, but it will be opened up to the public API soon. Internally this required supporting varying font metrics between characters, which also sets us up for inline styling e.g. varying font-size, font-style, etc. - see #65
…t by unicode range - #13 Mimics how CSS @font-face resolves across multiple fonts by unicode-range, only loading those font files needed for the characters actually used. This allows for more complete language coverage without having to include everything in one font file, and Latin text can now load a smaller font file by default. The support is currently limited to an internal set of fallback fonts, but it will be opened up to the public API soon. Internally this required supporting varying font metrics between characters, which also sets us up for inline styling e.g. varying font-size, font-style, etc. - see #65
…t by unicode range - #13 Mimics how CSS @font-face resolves across multiple fonts by unicode-range, only loading those font files needed for the characters actually used. This allows for more complete language coverage without having to include everything in one font file, and Latin text can now load a smaller font file by default. The support is currently limited to an internal set of fallback fonts, but it will be opened up to the public API soon. Internally this required supporting varying font metrics between characters, which also sets us up for inline styling e.g. varying font-size, font-style, etc. - see #65
@lojjic thanks for that information! Would it be possible to change the background color in certain ranges within the text as well? Right now I'm thinking it's possible to do that by using |
@william-mimura-thisdot I think |
…t by unicode range - #13 Mimics how CSS @font-face resolves across multiple fonts by unicode-range, only loading those font files needed for the characters actually used. This allows for more complete language coverage without having to include everything in one font file, and Latin text can now load a smaller font file by default. The support is currently limited to an internal set of fallback fonts, but it will be opened up to the public API soon. Internally this required supporting varying font metrics between characters, which also sets us up for inline styling e.g. varying font-size, font-style, etc. - see #65
…upport (#279) * feat(troika-three-text): initial support for multiple font files split by unicode range - #13 Mimics how CSS @font-face resolves across multiple fonts by unicode-range, only loading those font files needed for the characters actually used. This allows for more complete language coverage without having to include everything in one font file, and Latin text can now load a smaller font file by default. The support is currently limited to an internal set of fallback fonts, but it will be opened up to the public API soon. Internally this required supporting varying font metrics between characters, which also sets us up for inline styling e.g. varying font-size, font-style, etc. - see #65 * feat(troika-three-text): add fallback fonts for CJK and support 'lang' prop * feat(troika-three-text): add Noto Emoji font to fallback list * fix(troika-three-text): add CJK punctuation to unicode ranges * feat(troika-three-text): add Arabic and Chinese texts to example * feat(troika-three-text): integrate unicode-font-resolver for full unicode fallback font coverage * chore: allow unicode-ranges branch to publish prerelease versions * v0.48.0-unicode.0 * fix: fontResolverWorkerModule wasn't exported * v0.48.0-unicode.1 * fix: fix hang on zero-length text * v0.48.0-unicode.2 * feat: add fontWeight and fontStyle params for fallback font resolution * v0.48.0-unicode.3 * fix: pre-transpile the unicode-font-resolver lib * feat: allow configuring unicode-font-resolver data URL * docs for unicode font loading * v0.48.0-unicode.4 * chore: update unicode-font-resolver to 1.0.0
Hi,
first of all many thanks for this great package!
I have a question regarding the troika-3d-text component:
Is there currently a possibility to add two or more TextMeshes such, that they are combined inline:
How would I accomplish something like that?
The text was updated successfully, but these errors were encountered: