On Monday 16 October 2006 21:15, Abel Braaksma wrote:
> Manuel Mall wrote:
> > Sorry, but your example does not make sense to me. You provide HTML
> > not XSL:FO. Can you provide the exact fo file you feed into fop so
> > we can better understand your issue?
>
> My apologies. I thought it'd be clearer that way. Here's a snippet:
>
>    <fo:block line-height="313%" space-before="1em"
> space-after="1em">Paragraph with different sizes: <fo:block/>
>        <fo:inline font-size="60%" role="xhtml:font">x-small,
> </fo:inline> <fo:inline font-size="80%"
> role="xhtml:font">small,</fo:inline> <fo:inline font-size="100%"
> role="xhtml:font">normal,</fo:inline> <fo:inline font-size="135%"
> role="xhtml:font">larger,</fo:inline> <fo:inline font-size="171%"
> role="xhtml:font">large,</fo:inline> <fo:inline font-size="267%"
> role="xhtml:font">x-large,</fo:inline> <fo:inline font-size="313%"
> role="xhtml:font">xx-large.</fo:inline> And back to normal again.
>    </fo:block>
>
If I remove the line-height="313%" from the fo:block it seems to do 
exactly what you want, that is each line get the minimum necessary 
height to render it.

If I leave your settings the line-height on the first line is correctly 
set to 37.56pt (12pt * 313%). Note: As you didn't specify a font-size 
on the fo:block the inherited font-size is chosen which is the document 
default size of 12pt. The other lines get either the minimum 
line-height of 37.56pt or a bigger height if larger fonts are used.

>
> Here you see that I set the line-height on the block element. When I
> set the line-height on the fo:inline elements, it does not have any
> effect. If the block is small enough so that it spans multiple lines,
> without the line-height in the block element, the text will overlap.
> But with it, *all* lines will have the maximum height. I do not want
> that. I only want the lines to have the minimum needed line-height
> for the size of the text it contains.
>
Setting the line-height on an inline element does simply set the minimum 
height for that element. In your examples this never takes effect as 
the actual height is larger then the line-height. For example:
 <fo:inline line-height="60%" font-size="60%" role="xhtml:font">x-small, 
</fo:inline>
Assuming on the enclosing block the font-size is 12pt. That means the 
font-size on the inline is 7.2pt (60% of 12pt). Now you say the 
line-height is 60% of that value making it 4.32pt (60% of 7.2pt). 
Obviously that won't fit.

>  From the specs I understand that the line-height property is
> available on inline level elements also. I tried, but to no effect,
> like this (actually, I expected the overlap not to happen at all,
> unless I'd specifically say so):
>
>    <fo:block space-before="1em" space-after="1em">Paragraph with
> different sizes: <fo:block/>
>        <fo:inline line-height="60%" font-size="60%"
> role="xhtml:font">x-small, </fo:inline>
>        <fo:inline line-height="80%" font-size="80%"
> role="xhtml:font">small,</fo:inline>
>        <fo:inline line-height="100%" font-size="100%"
> role="xhtml:font">normal,</fo:inline>
>        <fo:inline line-height="135%" font-size="135%"
> role="xhtml:font">larger,</fo:inline>
>        <fo:inline line-height="171%" font-size="171%"
> role="xhtml:font">large,</fo:inline>
>        <fo:inline line-height="267%" font-size="267%"
> role="xhtml:font">x-large,</fo:inline>
>        <fo:inline line-height="313%" font-size="313%"
> role="xhtml:font">xx-large.</fo:inline>
>        And back to normal again.
>    </fo:block>
>
> Hmm, I see now there's also a line-stacking-strategy. Should I do
> something with that?
>
> Any ideas are very welcome,
>
> Cheers,
> -- Abel Braaksma

Hope this helps

Manuel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to