negative line spacing in Text

Matthias Hänel haenel at
Wed Jun 13 07:55:08 UTC 2018

Hey guys,

since Java 8 all javafx multiline text controls (Label, TextArea, TextFlow) support linespacing via the css -fx-line-spacing attribute and Properties (on TextArea on Text-Node of Skin accessible via lookup).
However none of them seem to support negative value which would be necessary to achieve a linespacing smaller then the default, since default value is 0.
If a negative value is used, e.g. for a Labels line spacing, it will simply not wrap or line feed(\n).
Is there a way to achieve a line spacing smaller than the default with these components?

Thank you in advance
Matthias Hänel
haenel at

onexip GmbH
Am Waldschloesschen 2 | D-01099 Dresden | Germany

More information about the openjfx-dev mailing list