RE: Line height vs. line spacing

Hi Tony,
thanks for that very informative explanation! I must say that for me - coming from a purely technical/non-type setting view of the world - grasping the intricate details of the actual FO line building algorithm has always been one of the hardest and most arduous/mind-boggling steps in understanding the XSL-FO specification!
So specifying the line-height.precedence/line-height.conditionality on each block in my document seems to be the way to go, then.
Thanks,
Chris

----------------------------------------
> From: Tony.Graham@MenteithConsulting.com
> To: www-xsl-fo@w3.org
> Date: Thu, 11 Nov 2010 11:35:28 +0000
> Subject: Re: Line height vs. line spacing
>
> On Wed, Nov 10 2010 11:53:30 +0000, mcauthon1980@hotmail.com wrote:
> ...
> > Trying to now map this onto the corresponding concepts from both the
> > CSS and XSL-FO specification, I'm faced with the problem that (by
> > defining an appropriate "line-height" on each of my regions and/or
> > blocks) I seem to get an additional space at the very end of my
> > surrounding block area:
> >
> >     First line
> >     [Gap] <---
> >     First line
> >     [Gap] <---
> >     First line
> >     [Gap] <---
> >
> > Though this seems consistent with the fact that "line-height" serves
> > to define the height of each line area this block generates, I leaves
> > me with the question of how I can get rid of this additional gap at
> > the end of each of my blocks?!
>
> Firstly, XSL FO is aligned with CSS2 (plus some CSS2 errata), and in
> both, the concept (broadly speaking) is that the difference between the
> font height and the line height is divided into two to give the
> 'half-leading' that can be added before and after each line, so the
> notional gaps are more:
>
>     [1/2 Gap] <---
>     First line
>     [1/2 Gap] <---
>     [1/2 Gap] <---
>     First line
>     [1/2 Gap] <---
>     [1/2 Gap] <---
>     First line
>     [1/2 Gap] <---
>
> Of course, if the line height is constant, the effect is pretty much the
> same (except at the top or bottom of a reference area).
>
> Line areas are defined in Section 4.5, Line-areas [1]. The most
> applicable properties are font-size [2], line-height [4], and
> line-stacking-strategy [4]
>
> The half-leading applies when line-stacking-strategy is 'font-height' or
> 'max-height' (default). The XSL formatter doesn't have to support the
> 'line-height' value, but if it does, you may still see the effect of the
> half-leading, depending on what's on the line.
>
> If you want to control the application of the half-leading between
> blocks (and if your XSL formatter supports it), you can specify
> line-height.precedence, since for a line-stacking-strategy of
> 'font-height' or 'max-height', the half-leading sets space-before and
> space-after.
>
> If you want to discard the half-leading at the top or bottom of a
> reference area, you can set line-height.conditionality (modulo your
> other problems with application of .conditionality).
>
> Regards,
>
>
> Tony Graham Tony.Graham@MenteithConsulting.com
> Director W3C XSL FO SG Invited Expert
> Menteith Consulting Ltd XML Guild member
> XML, XSL and XSLT consulting, programming and training
> Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
> Registered in Ireland - No. 428599 http://www.menteithconsulting.com
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> xmlroff XSL Formatter http://xmlroff.org
> xslide Emacs mode http://www.menteith.com/wiki/xslide
> Unicode: A Primer urn:isbn:0-7645-4625-2
>
>
> [1] http://www.w3.org/TR/xsl11/#area-line
> [2] http://www.w3.org/TR/xsl11/#font-size
> [2] http://www.w3.org/TR/xsl11/#line-height
> [2] http://www.w3.org/TR/xsl11/#line-stacking-strategy
>
 		 	   		  

Received on Thursday, 11 November 2010 13:08:28 UTC