Re: fo:inline bpd

```On Tue, 6 Sep 2005 04:02 pm, Jeremias Maerki wrote:
> Rather complex area, line building. One that is a little
> under-present in our testcases so far. I believe you're correct
> (comments in 4.6 and 7.15.4), but I have the impression that we'd
> actually need to look at this from a more general angle eventually.
> Not necessarily right now, of course. But it may be good to start
> building up test cases and the knowledge on all the advanced aspects
> of line building.
>
I seemed to have a bad run here :-). Whenever I poke my nose into
something lately the response seems to be: That's a very difficult
subject which needs more investigation... ```
```
Just joking - please don't take this as a complaint.

Yes, the spec says that areas returned from fo:inline have their own
line-height trait which can be different to the line-height trait of
the line area they belong to. We don't do that currently.

At a high level the algorithm seems to look like:
Collect all the Knuth sequences.
Break them into lines - this also determines the line dimensions
(line height, baseline, ...).
For each line determine the subsequences which belong to the same
child LM and give those to the child LMs for area construction.

The problem is that the Inline LM doesn't calculate the dimension of the
area it is suppose to construct from the subsequence given to it by the
Line LM. Instead it just assumes the dimension of the line as given to
it in the LayoutContext.

However, to be able to do the required calculations the Inline LM would
need access to the KnuthElements of the subsequence it is suppose to
construct the area for. However, what's given to it is a sequence of
KnuthPositions (the standard addAreas() interface) not elements.

Alternatively the Line LM could calculate the dimensions of the line
segment the Inline LM is suppose to construct. It may actually be
appropriate to do that in the Line LM as it already has the relevant
logic. But still we would need an interface to get this across to the
Inline LM.

> On 06.09.2005 06:57:06 Manuel Mall wrote:
> > Currently fop sets the bpd of areas created from fo:inlines to to
> > line-height of the line the area appears in.
> >
> > For example:
> >
> > <fo:block font-size="10pt">Some text <fo:inline
> > font-size="8pt">smaller text</fo:inline></fo:block>
> >
> > The inline parent area created for the fo:inline will be given a
> > bpd of 12pt, i.e. the line-height of the surrounding block, and not
> > 9.6pt which is the height of the fo:inline.
> >
> > The difference is visually noticeable to moment one applies
> > backgrounds or borders/padding to the fo:inline.
> >
> > Am I correct in saying that the current implementation is incorrect
> > and that the smaller bpd should be applied in the example above?
> >
> > Manuel
>
> Jeremias Maerki

Manuel
```