Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-727

Text of different sizes in a TextPane should have aligned baselines

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0
    • 2.0.1
    • wtk
    • None

    Description

      When you have spans of different font sizes in a TextPane, it looks to me like all the text is bottom-aligned, which generally looks bad. It would be much nicer if the baselines were aligned. Here's a deliberately exaggerated example:

      <Window maximized="true" xmlns:bxml="http://pivot.apache.org/bxml"
      xmlns="org.apache.pivot.wtk">
      <TextPane>
      <Document xmlns="org.apache.pivot.wtk.text">
      <Paragraph backgroundColor="yellow">
      <Span font="

      {size:48}

      ">
      <TextNode text="Label:" />
      </Span>
      <Span font="

      {size:24}

      ">
      <TextNode text=" some random text " />
      </Span>
      <Span font="

      {size:12}

      ">
      <TextNode text="(much smaller)" />
      </Span>
      </Paragraph>
      </Document>
      </TextPane>
      </Window>

      Attachments

        Activity

          People

            grandinj Noel Grandin
            bvanmelle Bill van Melle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: