Skip to content

Formspec: vertlabel element does not properly handle minetest.colorize or newlines #14426

@rubenwardy

Description

@rubenwardy

Copied from #11558

Minetest version

e7b05be

Summary

While testing some formspec features, I noticed that the vertlabel element does not change color when using minetest.colorize on its text. This is inconsistent with regular labels, and seems to be an artifact of how it functions (ie. instead of laying out the text vertically, it simulates vertical rendering with newlines). Looking at the code to confirm this, I also noticed that it won't handle \n correctly either, instead treating it like a space for layout purposes.

Repro

Make a formspec containing a vertlabel element, and use color escapes and newlines in it. Note that the text is not colored, and the newlines are still functioning as if the label was horizontal.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions