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

Impossible to set the tabulation indentation size in Text

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • P4
    • Resolution: Duplicate
    • 8
    • None
    • javafx
    • Windows 7 JDK8 b116

    Description

      The indentation size seems to be hard-coded in PrimsTextLayout:


          private float getTabAdvance() {
              float spaceAdvance = 0;
              if (spans != null) {
                  /* Rich text case - use the first font (for now) */
                  for (int i = 0; i < spans.length; i++) {
                      TextSpan span = spans[i];
                      PGFont font = (PGFont)span.getFont();
                      if (font != null) {
                          FontStrike strike = font.getStrike(IDENTITY);
                          spaceAdvance = strike.getCharAdvance(' ');
                          break;
                      }
                  }
              } else {
                  spaceAdvance = strike.getCharAdvance(' ');
              }
              return 8 * spaceAdvance;
          }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              oallouchjfx Olivier Allouch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: