alexheretic / glyph-brush

Fast GPU cached text rendering
Apache License 2.0
673 stars 52 forks source link

\t is ignored #139

Open PSteinhaus opened 3 years ago

PSteinhaus commented 3 years ago

As the title says tabs in text seem to be completely ignored, at least that's the behaviour I observe in ggez.

To reproduce run the text example of ggez and add some \t here and there for example. I'd be glad to hear that it's just us doing something wrong, so please tell me if you observe different behaviour in a different context.

alexheretic commented 3 years ago

I don't think tabs have any support currently. Would having them as a 4x-space be enough or do you have more sophisticated behaviour in mind?

PSteinhaus commented 3 years ago

Honestly, I don't have any specific behaviour in mind concerning this. We're a game engine, so I don't think we really need accurate tabulation in text. 4x-space would be fine with me. It might, on the other hand, be desirable to have more sophisticated tabs in glyph-brush one day, maybe not for ggez, but for other projects.

One of our users made us aware of this behaviour and I mainly just wanted to find out whether this is a bug, an unsupported but planned feature, or whether tabs are just not supposed to be a part of glyph-brush.

In my opinion this doesn't need to be implemented quickly, since, even in the report made on our repo, it seems more like someone just stumbled across this and was nice enough to take a second and inform us about it. Should a real need for working tabs ever come up as a topic in ggez I'll immediately inform you, though.

alexheretic commented 3 years ago

Thanks, yeah I'd say supporting them as a simple 4x space is an easy win and better than nothing. We can at least start there 👍.