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 "Mickey, John" <Mi...@leg.wa.gov> on 2002/02/19 17:50:36 UTC

Double space block vertical alignment

Hello,

I am trying to simulate a double spaced document using the line-height
attribute but I find that the lines of text are always centered vertically
in the block, is there a way to have the first line start flush against the
top of the block area ( all 12pts of extra space comes after the first line
instead of having 6pts before and 6pts after each line.)?

An example of what I have so far:

<?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="draft" page-width="8.5in"
page-height="11in" margin-left="0.9in" margin-right="0.7in">
         <fo:region-body margin-top="0.5in" margin-bottom="0.33in"/>
      </fo:simple-page-master>
   </fo:layout-master-set>
   <fo:page-sequence master-reference="draft">
      <fo:flow flow-name="xsl-region-body">
         <fo:block font-family="Courier" font-size="12pt" line-height="24pt"
hyphenate="false" text-align="justify" text-indent="0.3in"
background-color="grey">
Blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah.
         </fo:block>
      </fo:flow>
   </fo:page-sequence>
</fo:root>

Thank you,
John Mickey

Re: Double space block vertical alignment

Posted by Josh Campbell <jo...@zype.co.nz>.
Mickey, John wrote:

>I am trying to simulate a double spaced document using the line-height
>attribute but I find that the lines of text are always centered vertically
>in the block, is there a way to have the first line start flush against the
>top of the block area ( all 12pts of extra space comes after the first line
>instead of having 6pts before and 6pts after each line.)?
>
This has been bugging me as well so, sorry, no solution. I've been 
trying to find a way to control the height of a block (line-height seems 
to be the only thing that works) and have the text top aligned.

Has anyone pulled this off yet?


Thanks
Josh

ZYPE - Graphical Interface Design
Phone: 03 3862094
Mobile: 021 400 472
Web: www.zype.co.nz