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

Impossible to set the tabulation indentation size in Text

XMLWordPrintable

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

      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;
          }

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

              Created:
              Updated:
              Resolved:
              Imported: