Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2961

Avoid extra space after line break

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • Patch

    Description

      When a line break occurs at a breaking space with EN_START or EN_END alignment, a space will be added as the first character on the newline. This can result in a sort of "reverse indentation", where every line in a paragraph is indented a single space while the first line is not.

      I have attempted to fix this by moving the KnuthElements for the space before the KnuthElements for where the break occurs. It is entirely possible there are unintended side effects of this change. However from the testing I've done, it seems to be an overall improvement. If anyone is aware of any issues arising from this change I'd love to hear them.

      I've included an example as well as the patch.

      Attachments

        1. patch.diff
          14 kB
          Nicholas Moser
        2. example-after.pdf
          9 kB
          Nicholas Moser
        3. example-before.pdf
          9 kB
          Nicholas Moser
        4. example.fo
          10 kB
          Nicholas Moser

        Activity

          People

            Unassigned Unassigned
            NicholasMoser Nicholas Moser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: