xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Finn Bock <bck...@worldonline.dk>
Subject Re: [Bug 29124] - New line breaking algorithm
Date Thu, 12 Aug 2004 21:19:21 GMT
Simon Pepping wrote:

> TextInfo derives that value from the value of the word-spacing
> property.
> That must be an error in the property handling by FOP. 

Yes. I'll commit a fix for it tomorrow.

> In
> FOPropertyMapping 0pt is used as the default value. Apparently
> "normal" should be the default value. I am not sure how this can be
> done for a space property. Something similar happens for length
> properties, which can have the default value "auto". I think "normal"
> should be a keyword. 

Keywords are for mapping one value into another value before the values 
are parsed. In this case 'normal' should be implemented as an enum.

> Apparently, the actual value can only be
> calculated at layout time, when the font is known.

Yes, so the consumers of the 'word-spacing' value must must check if the 
value as an enum == NORMAL before using the value as a Space:

     Property wordSpacing = propertyList.get(PR_WORD_SPACING);
     if (wordSpacing.getEnum() == NORMAL) {
         textInfo.wordSpacing = new SpaceVal(
                new MinOptMax(min, opt, max), true, true, 0);
     } else {
         textInfo.wordSpacing = new SpaceVal(wordSpacing.getSpace());


View raw message