Im using FOP 2.1 to generate pdf files. It mostly works fine, but there are a number of warnings im trying to get rid of. First thing is to get rid of the missing font warnings:
2019-01-24 15:23:30.052 WARN 8772 --- [https-jsse-nio-8087-exec-6] org.apache.fop.apps.FOUserAgent : Font "Tahoma,normal,700" not found. Substituting with "any,normal,700".
2019-01-24 15:23:30.098 WARN 8772 --- [https-jsse-nio-8087-exec-6] org.apache.fop.apps.FOUserAgent : Font "Tahoma,normal,400" not found. Substituting with "any,normal,400".
Fop config is in fop.xml file and is as such:
<?xml version="1.0"?>
<fop>
<renderers>
<renderer mime="application/pdf">
<font kening="yes" embed-url="tahoma.ttf" sub-font="Tahoma">
<font-triplet name="Tahoma" style="normal" weight="normal"/>
</font>
<font kening="yes" embed-url="tahomabd.ttf" sub-font="Tahoma">
<font-triplet name="Tahoma" style="normal" weight="bold"/>
</font>
</renderer>
</renderers>
</fop>
Fop config is read in as follows:
InputStream inStr = this.getClass().getResourceAsStream("/fop.xml");
FopFactory fopFactory = FopFactory.newInstance(new java.net.URI("."), inStr);
Am i missing something or why it is not finding the fonts?