1

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?

Marko Taht
  • 1,448
  • 1
  • 20
  • 40
  • I think that in the configuration file `kening` should be `kerning`, and the `sub-font` attribute is not needed for ttf files ... but this is probably not the main cause of the problem. – lfurini Jan 24 '19 at 19:29
  • This [answer to a similar problem](https://stackoverflow.com/a/45552934/4453460) could help (just ignore the pdf/a settings). – lfurini Jan 24 '19 at 20:13
  • nothing chnged. Still, the same issue. – Marko Taht Jan 28 '19 at 07:22

0 Answers0