Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8314482

Add Text / TextFlow tab stops

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • None
    • javafx
    • None

      JavaFX text layout is missing support for a tab policy beyond fixed tab size added in JDK-8130738.

      Ideally, a TabStopPolicy should support features present in the common RTF editor such as TextEdit (see the screenshot), and possibly go beyond:

      - fixed tab size (for a monospaced font use case only)
      - fixed tab size policy (N, 2N, 3N, ... pixels)
      - arbitrary set of user-defined tab stops
      - left tab stop (default)
      - center tab stop
      - right tab stop
      - decimal tab stop

      The tab stop policy API may need to support variations, such as locale-specific decimal point for decimal tab stops, or how the tab stops are generated once the text goes beyond the last defined tab stop, i.e. whether it should use a fixed number of pixels, or some other logic.

      It's also worth noting that MS Word adds a bar tab stop and a number of leader options (see the screenshot).

      Unlike tabSize property, the TabStopPolicy property is paragraph-based, so likely to be a part of TextFlow.

      https://github.com/andy-goryachev-oracle/Test/blob/main/doc/TabStopPolicy/TabStopPolicy.md
      (updated 2023/12/11)

            prr Philip Race
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: