This is excellent. NB: I would use a fixed width font for this kind of exercise, eg: font-family="Courier" otherwise there is several cm variation over 30 12pt char between
> average & em spacing. Unlikely, but ...
The character width tables are available as XML in the FOP source distribution in src/codegen. If you are inclined so, you *can* use this for proper string width calculations in XSLT (well, kerning seems to be amiss).
J.Pietschmann