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

Bold spans in TextPane result in bad word breaking

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.0, 2.0.1
    • 2.5
    • wtk

    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

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

            Dates

              Created:
              Updated: