Page 1 of 1

Support rich text in rendering.draw_text

Posted: Sat Mar 09, 2019 8:31 pm
by grilledham
It would be nice if rendering.draw_text supported rich text.
draw_text.png
draw_text.png (1.44 MiB) Viewed 3175 times

Re: Support rich text in rendering.draw_text

Posted: Sun Mar 10, 2019 7:52 pm
by Bilka
I can't easily scale, rotate, and calculate the size of rich text, so this is unlikely to happen. You could just draw the sprites yourself.

Re: Support rich text in rendering.draw_text

Posted: Tue Mar 12, 2019 10:49 pm
by Rseding91
In addition to what Bilka said I have negative interest in making rich-text work anywhere in the game.

If I was allowed I would remove the entire feature.

So, I'm going to move this to won't-implement until some point that we either remove rich text from the game or Bilka decides to implement support for it.

So, probably forever.

Re: Support rich text in rendering.draw_text

Posted: Fri Mar 03, 2023 4:53 pm
by Genhis
Implemented for 1.1.77

Re: Support rich text in rendering.draw_text

Posted: Fri Mar 03, 2023 7:09 pm
by mmmPI
There sure must be an interesting story behind this :)

I appreciate the rich text feature for that i have friends who don't play in english and it help reduce confusion about naming things.

I have no idea what kind of complications it creates to manage such feature.

Re: Support rich text in rendering.draw_text

Posted: Fri Mar 03, 2023 8:19 pm
by Genhis
An interesting story? Well, Bilka asked me to implement it a few weeks ago because of some changes I made in 1.2 branch, and BurninSun actually pushed me to do it with how determined he was to make a rich text parser in Lua. :D

At first, it seemed like I would have to cut features like scaling and alignment because I didn't want to spend much time on this but it turned out not as bad. The most difficult thing (orientation) had already been implemented. So, I added features + tests step by step and JanSharp helped me with in-game testing.

However, Rseding's point is still valid. Rich text rendering is not optimized.