【问题标题】:Issue with Apache FOP 1.1 <auto-detect/> on CentOSCentOS 上 Apache FOP 1.1 <auto-detect/> 的问题
【发布时间】:2017-04-07 16:40:55
【问题描述】:

我在 CentOS 上的 Apache FOP 1.1 中遇到了 Cyrillic 字体的问题:显示的是######## 而不是符号。

这是来自 fop.xconf 的片段:

<fonts>              
    <font-triplet name="Arial" style="normal" weight="bold"/>       
    <auto-detect/>
 </fonts> 

在 Windows 10 上它运行良好,在 CentOS 上它产生######。 有人可以帮帮我吗?

【问题讨论】:

标签: java apache apache-fop


【解决方案1】:

font-triplet 元素应该在指向字体文件的font 元素内,例如:

<font kerning="yes" embed-url="/usr/share/fonts/Arial.ttf" embedding-mode="subset">
    <font-triplet name="Arial" style="normal" weight="bold"/>
</font>

此外,FOP 似乎无法在“通常”位置找到字体文件夹;您可以尝试显式添加字体文件夹

<directory>/usr/share/fonts/</directory>

您收到的具体错误消息有助于查明具体问题。

【讨论】:

  • 必须在 内的 /usr/share/fonts/ ?
  • 是的;您可以查看FOP's site 以获取更多示例和详细信息。
猜你喜欢
  • 1970-01-01
  • 2012-10-28
  • 2014-12-30
  • 1970-01-01
  • 2018-06-17
  • 2021-12-16
  • 2017-02-16
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多