Hi, j1997 wrote: > After upgrading to FOP 0.95, all texts (in table cells) are shifted towards > the top (the table cell's top border). It looks like the old FOP 0.20.5 > centered the text in a cell by the capital letters (i.e. a capital letter is > exactly vertically centered) and the new FOP 0.95 centers text vertically by > the lower letters.
I guess FOP 0.20.5 was taking the height of the biggest letter for the line height, which is wrong; what’s supposed to happen if you put a word like ‘jaguar’ in one cell, and ‘ToDo’ in the next cell? Should the baselines be aligned or not? Details can be found in section 4.5 of the XSL-FO specification [1] (who said this section was scary?). In short, the line height is the sum of text-altitude and text-depth [2]. Those are taken from the font metrics and are general (i.e., apply to every glyph, even those that don’t hang below the baseline). So the effect is what you noticed: if a word doesn’t have any letter with a descender, it will look like it’s shifted, whereas technically speaking it’s not. [1] http://www.w3.org/TR/xsl11/#area-line [2] http://www.w3.org/TR/xsl11/#text-depth > Resulting in all texts being shifted upwards. I found a > workaround by inlining each text: > > <fo:inline alignment-adjust="central"> > <xsl:value-of select="."/> > </fo:inline> Not sure there is any other workaround, I’m afraid. If text-depth were implemented you could use that, although that would also require to tweak your stylesheet anyway. Maybe some particular value of the line-stacking-strategy property may do the job, but this property remains cryptic to me. > Then, the text looks like in the old FOP 0.20.5: it's vertically centered by > the capital letters. Of course, this is an ugly workaround and there's > probably a global setting for this. But why does FOP 0.95 do this? And how > can I change it at one (single) place - and not for each text in table cell? If that doesn’t really help, I hope this clarified FOP’s behaviour. Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
