godotengine / godotengine/godot

RichTextLabel has no property for `line_spacing`, just `line_separation`

Open
#102,000 2 comments 3 reactions 0 assignees View on GitHub
discussion feature proposal topic:gui
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in `v4.4.beta1.mono.official [d33da79d3]`

### System information

macOS Sonoma 14.6.1

### Issue description

`RichTextLabel` has no `line_spacing` property, which would set the space only _between_ lines. Instead, it has `line_separation`, which adds that amount of space after _each_ line. E.g. in this picture, there is a lot of blank space below "Line 3":

Image

The best workaround I could find is making a `FontVariation` that has `spacing_bottom` set to a negative value while keeping `line_separation` at a positive value. I believe this is similar to specifying the BBCode `[font bt=5]` but in such a way that you don't need to modify every `RichTextLabel` in your game.

### Steps to reproduce

- Make a `RichTextLabel`
- Increase its `line_separation` property to make it more obvious

### Minimal reproduction project (MRP)

[richtextlabelspacingrepro.zip](https://github.com/user-attachments/files/18543572/richtextlabelspacingrepro.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.