Bug 4614 - wrap property combined with Chinese
Summary: wrap property combined with Chinese
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: all
Hardware: Other All
: P3 major
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-03 05:22 UTC by Frank Closset
Modified: 2012-04-01 06:53 UTC (History)
0 users



Attachments
test case to reproduce the problem (27.44 KB, application/octet-stream)
2001-11-03 05:38 UTC, Frank Closset
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Closset 2001-11-03 05:22:02 UTC
When formatting a chinese document the wrap property does not work well. 
Sometimes an overflow takes place, and for now I can't explain why this happens 
at that moment.

I use following font "Arial Unicode MS"

Does anybody have the same problem?
Comment 1 Frank Closset 2001-11-03 05:38:34 UTC
Created attachment 755 [details]
test case to reproduce the problem
Comment 2 Hua Feng Chen 2003-11-04 03:58:51 UTC
After tracing the source code, I found the wrapping occurs in class
    org.apache.fop.layout.LineArea
Further tracing shows that the method:
    private boolean canBreakMidWord() 
affects the wrapping result. Notice that when variable hyphProps.language 
has value of "zh", "ja", "ko", "vi", the function will return true, where
proper wrapping will be display.
My temp solution is to specify a "language" property in block, e.g.
    <fo:block font-family="SimSun" wrap-option="wrap" language="zh">
    </fo:block>
It turns out that the wrapping is working.

I believe that this shouldn't be counted as a solution. FOP DOES support
wrapping on CJK characters, but somehow there's no notes available on this,
or the configuration on FOP should be refined? 
Comment 3 Glenn Adams 2012-04-01 06:53:29 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed