As I should have guessed earlier not every rendering reused my global FopFactory that is configured with a fop.conf. After adressing this the FreeMono font worked perfectly
- I apologize the disturbance.... Br Christoffer Bruun Den 26-08-2015 kl. 15:42 skrev Christoffer Bruun: > Hi List, > > I am having a bit of a problem using a custom font in FOP and I am > hoping someone know which knob I have failed to turn. > > I am using FOP 1.1 embedded on Windows7. > > I have configured the FreeMono font in my fop.conf file: > <fop version="1.0"> > <strict-configuration>true</strict-configuration> > > <source-resolution>72</source-resolution> > <target-resolution>72</target-resolution> > > <default-page-settings height="11in" width="8.26in"/> > <font-base>./fonts/freefont-20120503</font-base> > <renderers> > <renderer mime="application/pdf"> > <filterList> > <value>flate</value> > </filterList> > <fonts> > <font metrics-url="FreeMono.xml" embed-url="FreeMono.ttf"> > <font-triplet name="FreeMono" style="normal" weight="normal" /> > </font> > </fonts> > </renderer> > </renderers> > </fop> > > The FreeMono.xml file was generated using > org.apache.fop.fonts.apps.TTFReader with no options except the filenames > > If I run org.apache.fop.tools.fontlist.FontListMain on my fop.conf I get > this output: > ... > FreeMono: > F15 [FreeMono] > FreeMono,normal,400 > ... > > When I try to build the PDF my FOPEventListener emits these errors: > FOPEventListener:353 - Font "FreeMono,normal,400" not found. > Substituting with "any,normal,400". > > If I introduce an error in fop.conf (e.g. changes the embed-url to some > nonexisting file) then my PDF generation fails as would be expected. > > I use the FreeMono font like this: > <fo:inline font-family="FreeMono" font-style="normal" font-weight="400" > font-size="12pt">FreeMono IS HERE</fo:inline> > > Is there anything else I need to do before the font is available ? > > > Br > Christoffer Bruun > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org