Bug 36007 - letter-spacing property causes ClassCastException
Summary: letter-spacing property causes ClassCastException
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: trunk
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-04 04:09 UTC by Manuel Mall
Modified: 2012-04-01 06:44 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Mall 2005-08-04 04:09:33 UTC
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.
Comment 1 Luca Furini 2005-08-04 10:06:45 UTC
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.
Comment 2 Luca Furini 2005-08-04 12:33:19 UTC
I was not completely right, the bug was in the LineLayoutManager ... anyway it 
should be fixed now! :-)
Comment 3 Glenn Adams 2012-04-01 06:44:59 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed