logoalt Hacker News

ivanjermakovtoday at 2:03 PM1 replyview on HN

It's hard to give you a recommendation without knowing the platform details, but if GUI rendering is not the goal, something like raylib might be a great choice to have a cross-platform GUI API, including text rendering.

https://www.raylib.com/


Replies

cataparttoday at 2:10 PM

Great recc! Unfortunately, raylib doesn't quite go as far as I would need. raylib does all of the text rendering in a very clean way, so I love it for that. But as far as actual editing, it doesn't have anything for that (last I checked, at least). It can render the text in way more ways than I need it to, but it can't actually do the editing work that prevents the common text-editing traps like line-based editing.

It's kind of an odd thing, I think. There are a bunch of articles on how you can write your own AST and use all kinds of data ranges (instead of heap allocation) to do deep technical performance optimization, but very few libraries that actually do any of that which aren't also bundled into an inseparable implementation of the library as a control/editor. Feels like there has been enough ink spilled over the "how" that someone would have packaged it up together into a referenceable library. Yet nothing I can find quite fits.