Skip to content

Unable to Put Multiple NewLines After Applying FontFile to RichTextLabel #77936

@jaberwok2010

Description

@jaberwok2010

Godot version

v4.0.3.stable.official [5222a99]

System information

Linux Mint 20.3 (una)

Issue description

Having a FontFile loaded into the Theme Overrides for a Label or RichTextLabel causes the node in question to condense repeated newlines tags down to a single newline. In other words, "\n\n\n\n" becomes "\n". This only occurs when a FontFile is loaded, and does not depend upon whether an actual font is loaded, present, or referenced. I would expect that loading a FontFile would not affect the way that Labels of any kind apply and render newlines.

Steps to reproduce

  1. Open a Label or RichTextLabel. (If it is a RichTextLabel, check the node Inspector to make sure that the BBCode_Enabled box is checked.)
  2. Insert text into the Text Box that includes several newlines in a row. Example Text:
This example text precedes three newlines.


This is example text both follows and precedes three newlines.


This is example text both follows three newlines.
  1. Open the "Fonts" drop down, under the "Theme Overrides" drop down in the Control section of the Inspector.
  2. Next to "Normal Font", click the down arrow and choose "New FontFile"
  3. Go back to the Text Box, and modify the text slightly -- for example, by pressing 'enter' and then 'backspace'.
  4. Uncheck the box next to "Normal Font", then repeat step 5.

Minimal reproduction project

FontIssue.zip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions