Open ickshonpe opened 1 year ago
Rendering tabs would be nice. But I don't know if I've ever seen an implementation that would render as expected. I think there's usually some sort of column width limitation if tabs are supported at all.
Here's a selection of examples from a few apps on this machine:
The bottom is cosmic-text
's editor-libcosmic
example, so I don't think it can save us in this instance.
Yeah it's not a great example, maybe using grid would be a better approach there.
I'm starting to have some really terrible ideas about how to hack tabs into current bevy, need to find something useful to do before I waste my time implementing them.
On Bevy main
:
It looks like support for tabs was added in cosmic-text
0.12
https://github.com/pop-os/cosmic-text/blob/main/CHANGELOG.md#0120---2024-06-18
I would like to test in a cosmic-text
example again to see if being able to modify the tab width would get the behavior you were after.
What problem does this solve or what need does it fill?
from the
display_and_visibility
example:In order to format the text it is displayed in three vertical columns. It's extremely unclear what this code is meant to do without running the example to see the displayed output.
A more natural way to write this would be to use tab escape sequences:
What solution would you like?
It seems tricky to add tabs from within
bevy_text
itself andglyph_brush_layout
ignores\t
. Maybe the cosmic text implementation will support tabs, I'm not sure.