if you have build font metrics correctly and are in the same directory as your userconfig and fo files then there are at least 2 more possibilities things can go wrong:
Wrong userconfig.xml or/and wrong .fo file. Here you have an example of font entries in userconfig file.
<font metrics-file="cour.xml" kerning="yes"
embed-file="C:\WINDOWS\Fonts\COUR.TTF">
<font-triplet name="CourierNew" style="normal" weight="normal"/>
</font>
<font metrics-file="cour_bold.xml" kerning="yes"
embed-file="C:\WINDOWS\Fonts\COURBD.TTF">
<font-triplet name="CourierNew" style="normal" weight="bold"/>
</font>
<font metrics-file="cour_italic.xml" kerning="yes"
embed-file="C:\WINDOWS\Fonts\COURI.TTF">
<font-triplet name="CourierNew" style="italic" weight="normal"/>
</font>
<font metrics-file="cour_bold_italic.xml" kerning="yes"
embed-file="C:\WINDOWS\Fonts\COURBI.TTF">
<font-triplet name="CourierNew" style="italic" weight="bold"/>
</font>
As you can see, all 4 versions of Courier font are here. Notice that the name is the same for all of them, just style and weight attributes are different. By the way, I don't believe there is weight='italic' as you wrote bellow in your example.
Here are first two lines from cour_bold.xml metrics. Notice the font name.
<?xml version="1.0" encoding="UTF-8"?>
<font-metrics type="TYPE0"><font-name>CourierNew,Bold</font-name>
And from cour_bold_italic.xml:
<?xml version="1.0" encoding="UTF-8"?>
<font-metrics type="TYPE0"><font-name>CourierNew,BoldItalic</font-name>
The second thing is that you don't have all four combinations for a given font and then in the fo file you are trying to do something like this:
<!-- BODY -->
<fo:flow flow-name="xsl-region-body" font-family="CourierNew">
which selects normal CourierNew, but then later on "hidden" somewhere there is a
font-weight="bold"
statement, which will produce font not found error, if you don't have metrics file for bold CourierNew font.
Hope it helps,
bob
metrics-file kerning embed-file">
name="Free 3 of 9 style weight"/>
>
metrics-file kerning embed-file">
name="Free 3 of 9 style weight"/>
>
metrics-file kerning embed-file">
name="Free 3 of 9 style weight"/>
>
but everytime i run the xsl:fo I get an error that the font is unkown, so it appears that this userconfig file is not being called and I don't understand what I need to do to call it.
I found this link, http://xml.apache.org/fop/embedding.html#config-external
But I don't know where that information goes.
Thanks
