我的XSL样式使用Arial字体
<fo:block font-family="Arial" font-size="8pt" font-weight="normal">
configuration文件fonts.xml:
<?xml version="1.0"?> <fop> <renderers> <renderer mime="application/pdf"> <fonts> <base>file:///C:/windows/fonts</base> </fonts> </renderer> </renderers> </fop>
也试过使用这个:
<auto-detect/>
和
<directory>C:\windows\fonts</directory>
我总是得到:
WARNING: Font "Arial,normal,400" not found. Substituting with "any,normal,400".
我应该修复什么,以便使用Arial字体?
这对我有用,需要在配置文件中明确指定Arial字体:
<?xml version="1.0"?> <fop> <renderers> <renderer mime="application/pdf"> <fonts> <font kerning="yes" embed-url="file:///C:/windows/fonts/arial.ttf"> <font-triplet name="Arial" style="normal" weight="normal"/> </font> </fonts> </renderer> </renderers> </fop>