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

Robert Meyer commented on FOP-2044:
-----------------------------------

After investigating these issues, it seems that the code related to this patch 
is working as intended. In many of these cases it's having issues because the 
words seemingly cannot be hyphenated. Take the example 
PROFILING_PC_STATUS_NO_COUNTER_AVAILABLE_FOR_TYPE. The first line seems to 
break fine at the word STATUS, however what happens is it will try and find the 
next available hyphenation point along the string. The word COUNTER apparently 
cannot be hyphenated and neither can the word NO. Also because STATUS has 
already been hyphenated that leaves the layout little option but to overflow 
the rest of the content which is not ideal.

Another example is SCTP_PARTIAL_DELIVERY_EVENT where again the hyphenation 
engine claims to find no opportunity to hyphenate either PARTIAL or DELIVERY. 
As such it hyphenates at the only point that is available (SCTP) and then 
overruns with the rest of the content. FOP is dependant on the hyphenation 
files distributed by TeX user group to determine where to break. There are two 
possible ways of resolving this which are:

- Forcing hyphenation at certain points i.e. inserting a hyphen with a break in 
the partial word e.g. PART-&x200B;IAL_DELIVERY.
- Providing your own hyphenation pattern files to determine where breaks should 
occur allowing FOP to break on words like PARTIAL or DELIVERY.

I will set this issue to the resolved status again as the problems you found 
stem from the hyphenation patterns rather than an issue with the code.

> [PATCH] Hyphenation of Uppercase Words, Combined with Underlines
> ----------------------------------------------------------------
>
>                 Key: FOP-2044
>                 URL: https://issues.apache.org/jira/browse/FOP-2044
>             Project: Fop
>          Issue Type: Improvement
>          Components: general
>    Affects Versions: 1.0
>         Environment: Operating System: All
> Platform: All
>            Reporter: Thomas Schraitle
>            Assignee: Robert Meyer
>             Fix For: trunk
>
>         Attachments: fop-trunk-jan02-2014-test-fop-2044.fo, 
> fop-trunk-jan02-2014.log, fop-trunk-jan92-2914-test-fop-2044.pdf, output.pdf, 
> patch.diff, patch2.diff, uppercase-hyphen.fo, uppercase-hyphen.pdf
>
>
> Consider the attached FO file which combines words of lowercase and uppercase 
> letters.
> As it is expected, the word "expected" is hyphenated correctly (example 2). 
> Also the uppercase "SUCCESS". Even combined with underlines before and after 
> the word (see example 4 and 5).
> However, if there is another word (like OCF_SUCCESS) the word isn't 
> hyphenated at all anymore. I don't know if this is an expected behaviour or 
> an issue in the hyphenation patterns. Interestingly, XEP from RenderX 
> hyphenates it as "OCF_SUC-CESS". As far as I know, they use also the TeX 
> hyphenation patterns as FOP.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to