memononen / nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
zlib License
5.06k stars 767 forks source link

ANSI Color Escape Sequences #665

Open anthofoxo opened 7 months ago

anthofoxo commented 7 months ago

Is there any plans to support ansi escapes. Specifically color escapes. The idea being that when a color sequence is encountered, it temporarily changes the color state. Is there a fork with this type of support.

If there isn't any support whatsoever for this, would a pr implementing this be of any use to others?

After digging into code, to properly support this, shaders may need modified to have per vertex colors. (Is this an acceptable change?) Otherwise some higher level trickery will have to happen.

mulle-nat commented 7 months ago

This is something I would rather see in a library, that builds on nanovg. To me the nano implies that this project doesn't try to do too much. On the other hand I've written something like this for myself once, so it certainly could be useful to many people.

anthofoxo commented 6 months ago

This generally would be a much more text focused thing and perhaps doesnt belong in nanovg itself, i may work on a small addon of the sorts for this eventually