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 "Manjush G. Menon" <ma...@lycos.co.uk> on 2003/12/05 08:10:00 UTC

Aligning paragraph text, setting font-family

hi,
I want to 'justify' all lines of a paragraph, but not the last one.

Now when i give

<fo:block
font-size="12pt" font-family="Arial" space-after="0cm"
text-align="start" text-align-last="relative"
white-space-collapse="false" white-space="normal" linefeed-treatment="preserve">

<xsl:value-of select="body"/>

</fo:block>

the following happens:

* The whole text including last line is justified
* The following error is shown

[ERROR] Unknown enumerated value for property 'text-align-last': relative
[ERROR] Error in text-align-last property value 'relative':
org.apache.fop.fo.expr.PropertyException: No conversion defined

Also, when i give font-family="Arial" in a fo:block, it shows

[ERROR] unknown font sans,normal,normal so defaulted font to any

Iam using Win2k and the font is there by default

Please help me

Thanks
--

Manjush G Menon
ICQ: 172-548-598



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Aligning paragraph text, setting font-family

Posted by Jeremias Maerki <de...@greenmail.ch>.
Yes, as long as you use the same fonts (i.e. font files).

On 05.12.2003 10:05:15 Stan Pinte wrote:
> and does it works cross platform? an xml fonts metrics file generated on 
> windows will work on unix?



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Aligning paragraph text, setting font-family

Posted by Stan Pinte <st...@axone.be>.
On Thu, 04 Dec 2003 23:40:14 -0800, John Root <jr...@publisys.com> wrote:

>
> Try the following:
>
> <fo:block
> font-size="12pt" font-family="Arial" space-after="0cm"
> text-align="justify" text-align-last="left" . . . .  >
> <xsl:value-of select="body"/>
>
> </fo:block>
>
>
>> Also, when i give font-family="Arial" in a fo:block, it shows
>>
>> [ERROR] unknown font sans,normal,normal so defaulted font to any
>>
>> Iam using Win2k and the font is there by default
>
> Nada! Fop only uses base 14 fonts by default. To use Arial, you need to
> build a font metrics file (in xml) for the font using TTFReader (part of 
> the
> Apache FOP distribution), then register the font with FOP by modifying or
> setting up an FOP configuration file. See the documentation on fonts (
> ./build/site/fonts.html ).

and does it works cross platform? an xml fonts metrics file generated on 
windows will work on unix?

>
> cheers,
> John
>
> ~~~~~~~~~~~~~~
> John Root
> Publishing Systems
> jroot@publisys.com
> ~~~~~~~~~~~~~~
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>



-- 
Stan Pinte.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Aligning paragraph text, setting font-family

Posted by John Root <jr...@publisys.com>.
Try the following:

<fo:block
  font-size="12pt" font-family="Arial" space-after="0cm"
  text-align="justify" text-align-last="left" . . . .  >
  
     <xsl:value-of select="body"/>

</fo:block>


> Also, when i give font-family="Arial" in a fo:block, it shows
> 
> [ERROR] unknown font sans,normal,normal so defaulted font to any
> 
> Iam using Win2k and the font is there by default

Nada! Fop only uses base 14 fonts by default. To use Arial, you need to
build a font metrics file (in xml) for the font using TTFReader (part of the
Apache FOP distribution), then register the font with FOP by modifying or
setting up an FOP configuration file. See the documentation on fonts (
./build/site/fonts.html ).

cheers,
John

~~~~~~~~~~~~~~
    John Root
Publishing Systems
jroot@publisys.com
~~~~~~~~~~~~~~


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org