Hi,

> -----Original Message-----
> From: Peter [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 18, 2006 5:49 PM
> 
> Gentlepeople,
> 
> I am trying to get rid of line-leading (not sure this is the 
> correct term
> actually) when adding an instream-foreign-object or 
> external-graphic to a block
> 
> As an example
> 
> <fo:block-container absolute-position="fixed" left="0pt" top="0pt">
>    <fo:block background-color="green" line-height="0" >
>      <fo:instream-foreign-object background-color="red">

Here is missing something like "<svg:svg...>

>        <svg:line x1="10" y1="10" x2="10" y2="20"
> style="stroke:rgb(0,0,0);stroke-width:1"/> 
>        </svg:svg>
>      </fo:instream-foreign-object>
>    </fo:block>
> </fo:block-container>
>  
> 
> In the result (pdf using fop 0.92) the instream object (with a red
> background) is not positioned at the top but rather at a 
> position which seems to (indirectly?) depend on the font-size.

That is the normal behaviour.
b-p-d initial alignment depends on baseline position, witch depends on
both line-height and font-size properties.

> One suggestion to eliminate this region is to set the 
> line-height to 0 (see
> http://www.renderx.net/lists/xep-support/2607.html)

As written above, setting both line-height and font-size to 0 allows to
get desired alignment.
Since line-height defaults to font-size * 120%, you only need to
explicitely set font-size.

> That does however not seem to work with FOP. The area between 
> the top of the red box and the top of the page is gone, but 
> the line is no longer positioned correctly, but shifted vertically.
> 
> If I set font-size to 0 and do not explicitely set line-height 
> it seems to work with FOP.

That is expected behaviour, since line-height property defaults to 120%
(* font-size)

> So I guess I have two questions
> 
> 1) What is the advised way to eliminate this "line-leading" 
> area (the approach above seems not very elegant)? 

There is an example mixing text and graphics provided with FOP:
%fop_path%/examples/fo/basic/alignment.fo

> 2) Is the suggestion made on the XEP list wrong and/or is 
> there a problem in FOP and/or is this one of the 
> implementation dependant areas of FO?

I don't know about XEP list, but in this solution, font-size needs to be
changed.
Setting only line-height is not sufficient.

Pascal 


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

Reply via email to