xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicholas Moser (Jira)" <j...@apache.org>
Subject [jira] [Commented] (FOP-2961) Avoid extra space after line break
Date Tue, 24 Nov 2020 14:53:00 GMT

    [ https://issues.apache.org/jira/browse/FOP-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17238193#comment-17238193
] 

Nicholas Moser commented on FOP-2961:
-------------------------------------

For anyone interested in using this patch, I also had to make the same change for justified
text, which occurs here: [https://github.com/apache/xmlgraphics-fop/blob/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java#L1316]

 

Basically moving elements 4, 5, and 6 before 1, 2, and 3. I can amend the patch if need be,
but it is effectively the same change in a different location.

> Avoid extra space after line break
> ----------------------------------
>
>                 Key: FOP-2961
>                 URL: https://issues.apache.org/jira/browse/FOP-2961
>             Project: FOP
>          Issue Type: Improvement
>            Reporter: Nicholas Moser
>            Priority: Minor
>         Attachments: example-after.pdf, example-before.pdf, example.fo, patch.diff
>
>
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message