[2.0.64] Rich text icons get underlined

We are aware of them, but do not have solutions that don't cause other issues. They go here in order not to take space in the main bug thread list.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 131
Joined: Tue Feb 06, 2024 5:18 am
Contact:

[2.0.64] Rich text icons get underlined

Post by hgschmie »

consider this relatively unremarkable label style:

styles.tt_clickable_label = {
type = 'label_style',
parent = 'semibold_label',
underlined = true,
font_color = default_color,
hovered_font_color = hovered_color,
clicked_font_color = hovered_color,
}


When rendering a rich text with this style as a label, it looks like this:
Screenshot 2025-08-12 at 18.06.58.png
Screenshot 2025-08-12 at 18.06.58.png (772.46 KiB) Viewed 374 times
The ugly part is this:
Screenshot 2025-08-12 at 18.13.15.png
Screenshot 2025-08-12 at 18.13.15.png (9.43 KiB) Viewed 374 times
The oil rich text icon gets the same underline as the text.

This might be opening a can of worms but this should only underline "regular" text. Any rich text should not be underlined (and probably whitespace surrounding the rich text should not either.
eugenekay
Filter Inserter
Filter Inserter
Posts: 675
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.64] Rich text icons get underlined

Post by eugenekay »

Maybe I am misunderstanding completely, but Rich Text is a piece of the parent text; not a standalone Icon element. It just happens to be using a PNG Icon for the rendered Glyph, rather than something coming from a Unicode font.

You asked for underlined = true,; and now you are surprised that it has an underline?

This is different than the "Web Centric" expectations which a User may have. Here in the Forums an Underline tag is interrupted by an Image: Under :arrow: lined. But Factorio is not a Web browser, so there is no reason/expectation for it to follow HTML/CSS rules.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 131
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.0.64] Rich text icons get underlined

Post by hgschmie »

It still looks ugly. So why not ask? Worst thing is "we won't change it". :-)
Rseding91
Factorio Staff
Factorio Staff
Posts: 16049
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.64] Rich text icons get underlined

Post by Rseding91 »

Thanks for the report. Looking into the underline implementation I'm going to put this into minor issues only because it was never explicitly intended to underline rich text. Although saying that, it was also never intended to be used outside of of hyperlinks.

Maybe some day if someone wants to they will re-work it to have better support but for now it's only officially supported use-case is hyperlinks and if it works in other places - why not.
If you want to get ahold of me I'm almost always on Discord.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 131
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.0.64] Rich text icons get underlined

Post by hgschmie »

Thanks for looking into this. I agree, it is a minor issue.
Post Reply

Return to “Minor issues”