You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Yaocl <ch...@gmail.com> on 2017/06/25 08:17:10 UTC

letter-spacing.maximum cause MinOpMax throw exception

Hi

I am trying to use letter-spacing.maximum to justification CJK
content. When set letter-spacing.maximum MinOpMax throw exception with
`factor < 0; was: -1`.

After some debug I found on TextLayoutManager.java:1325 it set factor to -1.
<https://github.com/apache/fop/blob/ddeba2b442/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java#L1325>

    int unsuppressibleLetterSpaces = suppressibleLetterSpace
              ? mapping.letterSpaceCount - 1
              : mapping.letterSpaceCount;

Should we subtract 1 only when mapping.letterSpaceCount greater than 1?