You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Miya Chiharu <mi...@e-d.pro.or.jp> on 2002/02/22 07:45:03 UTC

font-size problem

I try to format the following fo document.
Some character using big size font overlap the first line text.
I think that fo cannot find correct line height.
Can fop layout the following document correctly ?

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>
<fo:simple-page-master 
master-name="simple" 
margin-top="1in" 
margin-right="1in" 
margin-left="1in" 
margin-bottom="1in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">

<fo:block>This is the first line using default font.
</fo:block>
<fo:block>
<fo:inline font-size="20pt">Big Font</fo:inline>
<fo:inline font-size="10pt">Small Font</fo:inline>
<fo:inline font-style="italic" font-size="30pt">Italic Big Font</fo:inline>
</fo:block>

</fo:flow></fo:page-sequence></fo:root>
-----
Miya Chiharu


Re: font-size problem

Posted by Chuck Paussa <Ch...@systems.dhl.com>.
Miya,

property - "line-stacking-strategy" is not implemented yet.
Until it is, you'll have to use line-height and calculate it. I've found
that using 1/2 the maximum fon-size in mm works pretty good. So, your
fo:block would be

<fo:block line-height="10mm"><fo:inline font-size="20pt"> . . .

Chuck

Miya Chiharu wrote:

>I try to format the following fo document.
>Some character using big size font overlap the first line text.
>I think that fo cannot find correct line height.
>Can fop layout the following document correctly ?
>
><?xml version="1.0" encoding="UTF-8"?>
><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>
><fo:layout-master-set>
><fo:simple-page-master 
>master-name="simple" 
>margin-top="1in" 
>margin-right="1in" 
>margin-left="1in" 
>margin-bottom="1in">
><fo:region-body/>
></fo:simple-page-master>
></fo:layout-master-set>
><fo:page-sequence master-reference="simple">
><fo:flow flow-name="xsl-region-body">
>
><fo:block>This is the first line using default font.
></fo:block>
><fo:block>
><fo:inline font-size="20pt">Big Font</fo:inline>
><fo:inline font-size="10pt">Small Font</fo:inline>
><fo:inline font-style="italic" font-size="30pt">Italic Big Font</fo:inline>
></fo:block>
>
></fo:flow></fo:page-sequence></fo:root>
>-----
>Miya Chiharu
>