1.2.4.3. 添加fop配置文件fop.xconf

将原先的11中的conf文件夹中的fop.xconf拷贝一份出来,放到9

然后打开该文件,找到fop⇒renderers中的fonts部分,然后添加对应的配置,变成:


<fop version="1.0">
    ...
  <renderers>
    <renderer mime="application/pdf">
        ...
      <fonts>
        ...
        
        <!-- new added start -->
         <!-- register all the fonts found in a directory and all of its sub directories (use with care) -->
         <directory recursive="true">file:///c:/windows/fonts/</directory>

         <!-- automatically detect operating system installed fonts -->
         <auto-detect/>
        <!-- new added end -->
      </fonts>

                

即完成了对应的配置。

[提示]关于FOP的字体配置

关于fop的更多字体配置方面的内容,可以去参考官网的解释:Custom Fonts