【发布时间】:2015-06-11 07:41:49
【问题描述】:
我创建了一个项目。并创建文件夹层次结构,如 xml->conf->font
在 conf 文件夹中我放了我的 XCONF 文件,在字体文件夹中我放了我的字体(ttf 文件)
现在我想参考 XCONF 文件中的字体。请给我解决方案: 我的 XCONF 文件
<?xml version="1.0" encoding="utf-8" ?>
<fop>
<renderers>
<renderer mime="application/pdf">
<fonts>
<directory>/font</directory>
<directory recursive="true">/font</directory>
<auto-detect/>
<font embed-url="/font/grotesque-mt-1361500685.ttf">
<font-triplet name="GrotesqueMT" style="normal" weight="normal"/>
</font>
<font embed-url="/font/grotesquemt-light.ttf">
<font-triplet name="GrotesqueMT-Light" style="normal" weight="normal"/>
</font>
<font embed-url="/font/grotesquemt-bold.ttf">
<font-triplet name="GrotesqueMT-Bold" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
我收到以下异常: 使用 embed-url '/font/grotesque-mt-1361500685.ttf 解析字体失败
【问题讨论】: