Page 1 of 1

[2.0.72] Sprite gets stretched when used in rich text

Posted: Sat Nov 15, 2025 12:21 am
by tiriscef
I'm adding a sprite prototype that looks like this:

Code: Select all

{
    type = "sprite",
    name = "sosciencity-people",
    filename = "__sosciencity-graphics__/graphics/utility/people.png",
    size = 64
}
It's a 64x64 px sprite with some transparent whitespace around.

When I'm rendering it with rendering.draw_sprite, it looks as intended:
rendering_draw_sprite.png
rendering_draw_sprite.png (161.83 KiB) Viewed 326 times
But when I'm using the same sprite in rich text, it gets stretched and looks sad:
rich_text.png
rich_text.png (20.06 KiB) Viewed 326 times
Kind of like the transparent space got removed.
When I'm adding non-transparent pixels in every corner, it looks as intended in rich text.