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()); }
regards, finn