fop replace Chinese characters with "#" because it has no metrics for
Chinese fonts.

So I have to make one:

fop -fontmetrics -ttcname "WenQuanYi Zen Hei"
/usr/share/fonts/truetype/wqy-zenhei.ttc ./zh_CN/wqy-zen-hei.xml

Then add the xml to /etc/fop.xconf

<font metrics-url="file:///home/marguerite/opensuse-doc/zh_CN/wqy-zen-hei.xml"
kerning="yes" embed-url="file:///usr/share/fonts/truetype/wqy-zenhei.ttc">
          <font-triplet name="WenQuanYi Zen Hei" style="normal"
weight="normal"/>
          <font-triplet name="WenQuanYi Zen Hei" style="normal" weight="bold"/>

          <font-triplet name="WenQuanYi Zen Hei" style="italic"
weight="normal"/>
          <font-triplet name="WenQuanYi Zen Hei" style="italic" weight="bold"/>
</font>

between <fonts>

Then the tutorial I found tells me to "configure xsl" and set
"body/title/sans/monospace.font.family"

I changed /usr/share/xml/docbook/stylesheet/suse/pocket/fo/fonts.xsl

lines after "The fonts are from the RPM package freefont"

<xsl:param name="body.font.family">
  <xsl:call-template name="genfont">
    <xsl:with-param name="font-family">WenQuanYi Zen Hei</xsl:with-param>
  </xsl:call-template>
</xsl:param>

then `daps --docconfig=DC-opensuse-startup color-pdf

but I get:

五月 27, 2013 8:49:29 下午 org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SEVERE: Couldn't find hyphenation pattern for lang="zh_cn".
五月 27, 2013 8:49:30 下午 org.apache.fop.events.LoggingEventListener processEvent
INFO: Rendered page #1.
五月 27, 2013 8:49:30 下午 org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "版" (0x7248) not available in font "LiberationSans".
五月 27, 2013 8:49:30 下午 org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "权" (0x6743) not available in font "LiberationSans".
五月 27, 2013 8:49:30 下午 org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "所" (0x6240) not available in font "LiberationSans".
五月 27, 2013 8:49:30 下午 org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "有" (0x6709) not available in font "LiberationSans".
五月 27, 2013 8:49:30 下午 org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "及" (0x53ca) not available in font "LiberationSans".
五月 27, 2013 8:49:30 下午 org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "其" (0x5176) not available in font "LiberationSans".
五月 27, 2013 8:49:30 下午 org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "贡" (0x8d21) not available in font "LiberationSans".
五月 27, 2013 8:49:30 下午 org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "献" (0x732e) not available in font "LiberationSans".

The `Couldn't find hyphenation pattern for lang="zh_cn".` is about
word-wrapping. that's okay.

But the `Glyph "版" (0x7248) not available in font "LiberationSans".`
error seems to tell me that I didn't set font right.

Any ideas?

Marguerite
--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to