xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject letter-spacing
Date Wed, 01 Mar 2006 10:21:36 GMT
Still trying to fix my problem with letter-spacing and fixed width
spaces. Do I understand that correctly that XSL-FO's view of
letter-spacing is different than, say, PDF's? PDF's character spacing 
(PDF 1.4, 5.2.1) is designed so it advances the cursor for each (!)
character by the Tc value. FO on the other side applies half the
letter-spacing value on the start and end side of the glyph, and only
for the characters that are classified as "Alphabetic" by Unicode. And I
don't even say anything about setting precendence and conditionality to
anything else than the default.

The weird thing about this definition in FO is that these spaces are
added (by default) in every case, i.e. even at the beginning of a line:

("|"=line boundaries, "_"=spaces generated by letter-spacing)
(The text "text text text" is used with text-align-last="justify" here)


|text              text              text|

(Note: FOP does have the "permission" by the FO spec to increase the
inter-character gap here but we don't right now.)


|_t__e__x__t_  _t__e__x__t_  _t__e__x__t_|

PDF's character spacing would work like this, I think (although the last
character space needs to be eliminated by the layout manager [1]):

|t__e__x__t__  __t__e__x__t__  t__e__x__t|(__) <-- [1]

If I'm right here (not really sure, that's why I'm asking), it would
mean that we should probably stop using the Tc feature from PDF and
instead control the glyph positioning ourselves like we already do in


Jeremias Maerki

View raw message