DITA Fo plugin: adding fonts
Posted: Wed Jan 14, 2009 5:09 am
Hi,
I am trying to figure out how to use user defined fonts with FOP. When compiling topic.fo to produce the pdf output, I get errors as the following:
This leads me to consider that fop cannot find my font.
According to what I read on fop website, I think I am supposed to use a config file to notify fop of where my fonts are. In the build file delivered with Oxygen, you call the fop lib as follows:
Is it correct to say that fop_relax_validation.xml is the config file I am looking for?
I edited fop_relax_validation.xml as follows:
Unfortunately, that does not make any difference. Would you have any idea where I went wrong? I believe the font names are correct (Antenna Renderer outputs the pdf with the correct fonts.)
Thanks.
Nicolas
I am trying to figure out how to use user defined fonts with FOP. When compiling topic.fo to produce the pdf output, I get errors as the following:
Code: Select all
[fop] 600 WARN [ main ] org.apache.fop.fonts.FontInfo - Font 'TheSansOsF-Plain,normal,400' not found. Substituting with 'any,normal,400'.
According to what I read on fop website, I think I am supposed to use a config file to notify fop of where my fonts are. In the build file delivered with Oxygen, you call the fop lib as follows:
Code: Select all
<fop format="application/pdf" fofile="${inputFile}"
outfile="${outputFile}" messagelevel="info" force="true" userConfig="${dita.dir}/fop_relax_validation.xml" basedir="${outputDir}">
</fop>
I edited fop_relax_validation.xml as follows:
Code: Select all
<fop version="1.0">
<!-- No strict FO validation for the Apache FOP-->
<strict-validation>false</strict-validation>
<fonts>
<directory>C:\Windows\Fonts</directory>
<auto-detect/>
</fonts>
</fop>
Thanks.
Nicolas