The following fo: <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> <fo:layout-master-set> <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:block><fo:inline letter-spacing.optimum="2pt" letter-spacing.minimum="0pt" letter-spacing.maximum="4pt">D</fo:inline>efault</fo:block> </fo:flow> </fo:page-sequence> </fo:root> causes a java.lang.ClassCastException: org.apache.fop.layoutmgr.KnuthPenalty Exception. It only happens if the fo:inline with the letter-spacing property is the first element in the block. It also only happens for the letter-spacing property set as <space> as shown above, that is something like: <fo:block><fo:inline letter-spacing="2pt">D</fo:inline>efault</fo:block> is not causing an exception.
Thanks for signalling this. Your precise description makes me think that the bug should affect an implementation of the method addALetterSpaceTo(). I'll have a closer look and try to quickly find a fix.
I was not completely right, the bug was in the LineLayoutManager ... anyway it should be fixed now! :-)
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed