How to set the fonts in fop-0.91beta
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 8
- Joined: Wed Jan 18, 2006 9:53 am
How to set the fonts in fop-0.91beta
Hi Iam using \fop-0.91beta version...
I have set the fonts like this in conf/fop.xconf
<fonts>
<!-- 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>
<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>
<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>
<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"/>
</font>
<!-- 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>
<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"/>
</font>
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..
bye
I have set the fonts like this in conf/fop.xconf
<fonts>
<!-- 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>
<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>
<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>
<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"/>
</font>
<!-- 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>
<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"/>
</font>
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..
bye
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
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.
Regards,
Sorin
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.
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service