[ 
https://issues.apache.org/jira/browse/FOP-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pascal Sancho closed FOP-2453.
------------------------------
    Resolution: Invalid

Hi,

1st, do not provide XSLT as test case, we require here resulting XSL-FO 
material (see \[1]).
That said, your algorithm to compute text width assumes that all characters 
have the same width, witch is wrong: usually, Japanese chars are wider than 
Latin ones.
So that can give unexpected result.
If you want to get text width, that can be done using the intermediate format 
(see \[2]):
{code:title=XSL-FO}
    <fo:inline background-color="white">my text</fo:inline>
{code}
will result in something like that:
{code:title=IF}
    <rect x="0" y="2484" width="28800" height="9432" fill="#ffffff"/>
    <font family="monospace" style="normal" weight="400" variant="normal" 
size="12000" color="#000000"/>
    <text x="0" y="10032">my text</text>
{code}
Note that in IF file, units are in millipoints (72000mp = 1in).

Since FOP behaves correctly here, I close the issue.
For such FOP usage questions, please ask on fop-users list; you'll get greater 
audience (see \[3]).

\[1] http://xmlgraphics.apache.org/fop/bugs.html#issues_new
\[2] http://xmlgraphics.apache.org/fop/1.1/intermediate.html
\[3] http://xmlgraphics.apache.org/fop/maillist.html#fop-user

> fo:list-item-label Automatically wrap when it contains japanese character
> -------------------------------------------------------------------------
>
>                 Key: FOP-2453
>                 URL: https://issues.apache.org/jira/browse/FOP-2453
>             Project: Fop
>          Issue Type: Bug
>            Reporter: zhangcui
>
> <xsl:variable name="aa">
> <xsl:value-of select="string-length('1ff章2') + 10" />
> <xsl:value-of select="'mm'" />
> </xsl:variable>
> <fo:table>
> <fo:table-column column-number="1" />
> <fo:table-body>
> <fo:table-row >
> <fo:table-cell>
> <fo:list-block>
> <fo:list-item>
> <fo:list-item-label end-indent="label-end()">
> <fo:block>
> <xsl:value-of select="'1ff章2'" />
> </fo:block>
> </fo:list-item-label>
> <fo:list-item-body start-indent="{$aa}">
> <fo:block><xsl:value-of select="'HH1'" /></fo:block>
> </fo:list-item-body>
> </fo:list-item>       
> <fo:list-item>
> <fo:list-item-label end-indent="label-end()">
> <fo:block></fo:block>
> </fo:list-item-label>
> <fo:list-item-body start-indent="{$startIndent}">
> <fo:block><xsl:value-of select="'HH2'" /></fo:block>
> </fo:list-item-body>
> </fo:list-item>
> </fo:list-block>
> </fo:table-cell>
> </fo:table-row>
> </fo:table-body>
> </fo:table>
> it should be
> 1ff章2---HH1
> -----------HH2
> but the result is
> 1ff---HH1
> 章
> 2
> -------HH2
> and if change the '1ff章2' to '1fff6662',it goes well.
> if do not use the fo:list-block,like this
> <fo:table-cell>
> <fo:block>
> <xsl:value-of select="'1ff章2'" />
> </fo:block>
> </fo:table-cell>
> the '1ff章2'display in a line,do not wrap.
> i cannot find the reason.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to