FWIW I just downloaded the evaluation version of the Antennahouse 
Formatter and it generates as per my option b). For all to see here is 
the fo:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; 
xmlns:svg="http://www.w3.org/2000/svg";>
      <fo:layout-master-set>
        <fo:simple-page-master master-name="normal" page-width="5in" 
page-height="5in">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="normal" 
white-space-collapse="true">
        <fo:flow flow-name="xsl-region-body">
          <fo:block font-size="24pt">
            Start-p<fo:inline font-size="12pt" background-color="yellow" 
vertical-align="top">top<fo:inline font-size="18pt" 
background-color="red" 
vertical-align="bottom">p-bottom-g</fo:inline></fo:inline>g-End
          </fo:block>
          <fo:block font-size="24pt">
            Start<fo:inline font-size="12pt" background-color="yellow" 
vertical-align="top">top<fo:inline font-size="18pt" 
background-color="red" 
vertical-align="bottom">p-bottom-g</fo:inline></fo:inline>End
          </fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>

and I'll attach both the RenderX and AntennaHouse pdf outputs (I did put 
those strange letters 'g' in 'p' in to be able to see the font 
descenders clearly).

IMO, AntennaHouse got the vertical alignment right but, and this was 
discussed in another thread mainly between me and Finn, I think RenderX 
got the highlight correct, i.e. the inline with the word "top" has only 
the small line-height. Note also that in the AntennaHouse PDF the red 
background does not quite reach to the bottom of the descenders.

Now, the BIG question is, what should FOP do or 'what is the right way'?

Manuel

On Sun, 25 Sep 2005 09:49 am, Manuel Mall wrote:
> Andreas,
>
> let me start with thanking you for taking the time to look into this
> and respond so quickly. This is much appreciated. This post arrived
> here after midnight by which time I was sound asleep. I only got to
> look at it this morning.
>
> On Sun, 25 Sep 2005 12:39 am, Andreas L Delmelle wrote:
> > On Sep 24, 2005, at 17:39, Manuel Mall wrote:
> > > On Sat, 24 Sep 2005 11:27 pm, Andreas L Delmelle wrote:
> > >> Anyway, the full description would be:
> > >> The alignment-baseline on the first inline is aligned with the
> > >> before-edge baseline of the outer block. Now, IIC, this has an
> > >> impact on its own after-edge baseline, which is then in its turn
> > >> the basis for the alignment-baseline of the innermost inline (?)
> > >
> > > You are right - this is exactly the question: Does it have an
> > > impact on its after-edge baseline or not? Intuitively I would say
> > > YES but the spec says NO the baseline table is not recalculated
> > > (rescaled) when the font-size changes.
> >
> > I think I got it. Correct me if I'm wrong...
> >
> > The description in the Rec applies to cases where only the
> > font-size changes, and all the alignment-related properties have a
> > value of "auto"...
> >
> > > The baseline-table seems to only be recalculated on
> > > a baseline-shift but not otherwise.
> >
> > ... but the baseline-shift value for the first inline is non-zero
> > (value "baseline" is not equal to value "0"), so the Rec says in
> > 7.13.3:
>
> I think that is the core point. IMO the baseline-shift for the first
> inline is 0. Yes, there is a change of alignment-baseline but NO
> shift of any baseline. As you pointed out before vertical-align="top"
> is equivalent to:
>     alignment-baseline="before-edge"
>     alignment-adjust="auto"
>     baseline-shift="baseline"
>     dominant-baseline="auto"
> And 7.13.3. says for baseline-shift="baseline": There is no
> baseline-shift; the dominant baseline remains in its original
> position.
>
> So neither changing the font-size nor changing the vertical-align to
> "top" or "bottom" involves a baseline-shift and therefore the
> original baseline-table stays in place.
>
> > "When the value of 'baseline-shift' is other than '0', then the
> > baseline-table font-size component of the 'dominant-baseline'
> > property is re-computed to use the 'font-size' applicable to the
> > formatting object on which the non-zero 'baseline-shift' property
> > is specified."
> >
> > So, the dominant-baseline *is* re-computed for the first inline it
> > seems, although this isn't apparent if you look only at the
> > description for the "baseline" value:
> >
> > "There is no baseline shift; the dominant-baseline remains in its
> > original position."
> >
> > Easy to get confused by this, but still, I think your original a)
> > applies here.
> >
> > Problem solved? :-)
>
> I still think according to the spec its b). :-)
>
> > Cheers,
> >
> > Andreas
>
> Manuel

Attachment: inline_vertical-align_3.xml.axf.pdf
Description: Adobe PDF document

Attachment: inline_vertical-align_3.xml.xep.pdf
Description: Adobe PDF document

Reply via email to