Fork me on GitHub

SIde stupid question - this isn't quite the place but you might know - is xterm.js the most "evolved" implementation of rich/unicode text on webGL? would that be recommended to read/fork as a starting place for that?


I'm not sure what you mean. I thought xterm used the 2d canvas API and not webGL?


As I mentioned in the other thread, it might be helpful to describe what you're working on.


I think it's webGL now, or at least someone put a lot of work into trying:

👍 1

I said there, trying to build a visual programming ish tool, I've built custom tools in react before but by no means an expert, wondering if it's time to jump away from DOM


it seems like if one wants to do that, interesting graphics are now easier but text is harder, that's why I was searching around for text implementations


btw I read most of your blog series on membrane already, I found it very informative thank you


thanks! If you have any feedback or suggestions for ways to improve or clarify anything in the posts, I'm very open to criticism.


Improved programming tools is one of the main target use cases for membrane. Im still working on the ideas and tools for the 4th blog post.


well, if you have any idea the best place for me to look for a reference implementation or library for text-heavy applications on canvas/webGUI let me know, so far all I saw is xterm.js, "primrose" and "carota"


There's lots of applications that use text. Another example off the top of my head is CodeMirror. For performance, it depends a lot on what you're trying to do, what the bottlenecks are, common usage etc. I thought displaying text was one area where the DOM actually worked well. It still depends on usage though.


Unless you're 100% sure that drawing text will be a significant bottle neck and there's no way to replace the renderer in the future (like xterm.js did), then I would probably just use whichever graphics library seems most comfortable.


AFAIK there's few that actually "paint" the text though, only ones using canvas/webGL or the very low levels of a desktop app framework like I assume buried somewhere in WPF, qt


so if I'm committed to be in web, not use DOM, I need to find a library or reference


fwiw, I've found text rendering to be pretty fast. If you do need some speedups, you can do some basic draw caching (eg. by line) and that should be fast enough for most use cases.


It's probably fast enough without draw caching for most use cases as well.