JDK-8231014 : Add first line text indent support for javafx.scene.text.TextFlow
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: jfx14
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2019-09-13
  • Updated: 2023-08-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
A common feature in multi-line, wrapping text entry fields is the ability to indent the first line of text.  This feature is commonly used for writers of prose where, instead of using multiple new lines to delineate paragraphs, a text indent is used on the first line of the text.  This layout is also the standard in printed prose such as books.

HTML CSS has support for this feature via the "text-indent" property.  JTextPane in Java Swing supported it via StyleConstants.setFirstLineIndent().

Please add a new JavaFX css property for TextFlow: "-fx-text-indent" (or similar) that allows the user to set the first line indent in the flow.



Comments
I agree with the submitter that this should be a property in TextFlow. Additionally, we might consider allowing negative first line indent, similarly to MS Word. Also, in MS Word when a leading TAB is combined with a negative first line indent, it works as if to negate the negative indent (see attached).
31-08-2023

I wonder if the submitter really means TextFlow and not Text ?
17-09-2019