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

Impossible to set the tabulation indentation size in Text

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd
    • Component/s: javafx
    • Environment:

      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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Imported: