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

Bold spans in TextPane result in bad word breaking

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0, 2.0.1
    • Fix Version/s: 2.5
    • Component/s: wtk
    • Labels:

      Description

      If you have a mixture of plain and bold spans of text in a paragraph, the bold spans don't behave properly with respect to line breaking – the system will happily break a line in the middle of a bold word (though apparently this happens only for the first word in a bold span), and in particularly perverse cases will place the first character of a bold word at the start of a line and then break immediately after it.

      Here's a test case I made:

      <Window maximized="true"
      xmlns:bxml="http://pivot.apache.org/bxml"
      xmlns="org.apache.pivot.wtk">
      <TextPane>
      <Document xmlns="org.apache.pivot.wtk.text">
      <Paragraph>
      <Span>This paragraph has some words in </Span>
      <Span font="

      {bold:true}

      ">bold</Span>
      <Span>, and if you </Span>
      <Span font="

      {bold:true}

      ">reshape the window</Span>
      <Span> to certain widths, they will break poorly.</Span>
      </Paragraph>
      </Document>
      </TextPane>
      </Window>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bvanmelle Bill van Melle
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: