Page 1 of 1

How to set the fonts in fop-0.91beta

Posted: Sat Mar 04, 2006 12:56 pm
Hi Iam using \fop-0.91beta version...

I have set the fonts like this in conf/fop.xconf


<!-- example -->
<font metrics-url="C:\arial.xml" embed-url="C:\arial.ttf" kerning="yes">
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="ArialMT" style="normal" weight="normal"/>
<font metrics-url="D:\fop\fop-0.91beta-bin-jdk1.4\fop-0.91beta\arialbd.xml" embed-url="D:\fop\fop-0.91beta-bin-jdk1.4\fop-0.91beta\arialbd.ttf" kerning="yes" >
<font-triplet name="Arial" style="normal" weight="bold"/>
<font-triplet name="ArialMT" style="normal" weight="bold"/>
<font metrics-url="D:\fop\fop-0.91beta-bin-jdk1.4\fop-0.91beta\ariali.xml"
embed-url="D:\fop\fop-0.91beta-bin-jdk1.4\fop-0.91beta\ariali.ttf" kerning="yes" >
<font-triplet name="Arial" style="italic" weight="normal"/>
<font-triplet name="ArialMT" style="italic" weight="normal"/>
<font metrics-url="D:\fop\fop-0.91beta-bin-jdk1.4\fop-0.91beta\arialbi.xml" embed-url="D:\fop\fop-0.91beta-bin-jdk1.4\fop-0.91beta\arialbi.ttf" kerning="yes">
<font-triplet name="Arial" style="italic" weight="bold"/>
<font-triplet name="ArialMT" style="italic" weight="bold"/>
<!-- Example Japanese fonts
<font metrics-url="msgothic.xml" embed-url="D:\winnt\font\msgothic.ttc" kerning="yes">
<font-triplet name="Gothic" style="normal" weight="normal"/>
<font-triplet name="Gothic" style="normal" weight="bold"/>
<font-triplet name="Gothic" style="italic" weight="normal"/>
<font-triplet name="Gothic" style="italic" weight="bold"/>
<font metrics-url="msmincho.xml" embed-url="Cyberbit.ttf" kerning="yes">
<font-triplet name="Mincho" style="normal" weight="normal"/>
<font-triplet name="Mincho" style="normal" weight="bold"/>
<font-triplet name="Mincho" style="italic" weight="normal"/>
<font-triplet name="Mincho" style="italic" weight="bold"/>

but when i run the fop it will shows following error....

Font 'Arial,normal,400' not found. Substituting with default font.
Font 'Arial,normal,700' not found. Substituting with default font.

Please i need the solution as soon as possible..


Posted: Mon Mar 06, 2006 3:55 pm
by sorin_ristache

You have to use the values Arial, ArialMT, Gothic, etc. for the font-family attribute and the appropriate values for the font-weight and font-style attributes (bold, normal, italic) in the fo:block blocks containing the text that you want to render with the fonts configured in fop.xconf. You did not say anything about the source FO document so I cannot guess anything about it.