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

Mark Craig commented on FOP-2239:
---------------------------------

I am not seeing the same behavior as you have seen. After making the change and 
compiling FOP, I see even more hyphens in mid line.

Here's what I have done:

1.
Get FOP source:

        svn co http://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk/ fop-svn

2.
Edit fop-svn/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java to 
comment out the while loop as follows:

        /*while (lastIndex > 0 && foText.charAt(lastIndex - 1) == 
CharUtilities.SOFT_HYPHEN) {
            lastIndex--;
        }*/

3.
Compile FOP:

        cd fop-svn ; ant

4.
Generate the sample PDF.

        fop ../sample.fo ../sample.pdf


When I open sample.pdf, I see this content:

        Some blocks with soft hyphens
.-.-
.- .-
.-
.-]
.-\
.-"
.-a
.-Z

                
> Soft hyphens appear in mid line in PDF output
> ---------------------------------------------
>
>                 Key: FOP-2239
>                 URL: https://issues.apache.org/jira/browse/FOP-2239
>             Project: Fop
>          Issue Type: Bug
>          Components: pdf
>    Affects Versions: 1.1, trunk
>         Environment: $ java -version
> java version "1.7.0_17"
> Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
> Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
>            Reporter: Mark Craig
>         Attachments: simple.fo, simple.pdf
>
>
> When producing PDF, soft hyphens show up in mid line when followed by 
> punctuation characters such as ., ], and ".
> In the test case that I will attach to this issue:
> <fo:block><fo:inline font-size="0.9em">.&#xAD;.&#xAD;</fo:inline></fo:block>
> <fo:block><fo:inline font-size="0.9em">.&#xAD; .&#xAD;</fo:inline></fo:block>
> <fo:block><fo:inline font-size="0.9em">.&#xAD;</fo:inline></fo:block>
> <fo:block><fo:inline font-size="0.9em">.&#xAD;]</fo:inline></fo:block>
> <fo:block><fo:inline font-size="0.9em">.&#xAD;\</fo:inline></fo:block>
> <fo:block><fo:inline font-size="0.9em">.&#xAD;"</fo:inline></fo:block>
> <fo:block><fo:inline font-size="0.9em">.&#xAD;a</fo:inline></fo:block>
> <fo:block><fo:inline font-size="0.9em">.&#xAD;Z</fo:inline></fo:block>
> looks like this in the PDF:
> .-.
> . .
> .
> .-]
> .\
> .-"
> .a
> .Z
> The generation does not display any errors:
> $ fop simple.fo simple.pdf 
> Rendered page #1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to