-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
TextLayoutInfo
doesn't contain every processed glyph
#13063
Comments
Is this just a matter of exposing more of the internals? |
Not completely, This is the part that selectively fills the list: bevy/crates/bevy_text/src/glyph_brush.rs Line 101 in 4735776
So there are multiple issues: The |
I'd just like to add that having access to the processed glyphs would be useful to implement the typewriter effect which is used nearly ubiquitously in RPGs or any game with dialogue boxes. Also in this space it could be used to make text glyphs "jiggle" or fly around the screen into place. Ensuring that they are all present when you expect them makes this process easier, though I would like to do more testing to see if Bevy could make this process easier in the future. |
This was fixed by #10193 |
Bevy version
0.13
What you did
Debug log any
TextLayoutInfo
to inspect the glyph list.What went wrong
The
TextLayoutInfo
only containsPositionedGlyph
s that are from the outlined list.Additional information
Interacting with text (i.e. placing a caret, selection) is impossible without knowing the positions of individual glyph and their relation to the sections they came from. While the relation part can be worked around, the position and scale of the rendered glyph is necessary. This info is currently opaque and recalculating it is both expensive and needs copy/paste of private bevy code, such as the
GlyphPlacementAdjuster
The text was updated successfully, but these errors were encountered: