Support rich text in rendering.draw_text

Post Reply
grilledham
Inserter
Inserter
Posts: 23
Joined: Tue Sep 25, 2018 9:32 pm
Contact:

Support rich text in rendering.draw_text

Post by grilledham »

It would be nice if rendering.draw_text supported rich text.
draw_text.png
draw_text.png (1.44 MiB) Viewed 3151 times

Bilka
Factorio Staff
Factorio Staff
Posts: 3135
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Support rich text in rendering.draw_text

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Support rich text in rendering.draw_text

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Genhis
Factorio Staff
Factorio Staff
Posts: 120
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: Support rich text in rendering.draw_text

Post by Genhis »

Implemented for 1.1.77

mmmPI
Smart Inserter
Smart Inserter
Posts: 2745
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Support rich text in rendering.draw_text

Post 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.

Genhis
Factorio Staff
Factorio Staff
Posts: 120
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: Support rich text in rendering.draw_text

Post 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.

Post Reply

Return to “Implemented mod requests”