Re: [xep-support] Configuring Asian Fonts How-To

From: Gustaf Liljegren (gustafl@algonet.se)
Date: Sat Nov 09 2002 - 17:32:10 PST


Eliot wrote:

>I am trying to configure XEP under Windows to render Asian languages
>(Japanes and Simplified Chinese to start with) and I'm not having much
>luck, but largely because I have no idea what I should be doing.

What you should be doing is to copy your CIDFont directory to /afm. You
normally find it in your Acrobat directory (also Acrobat Reader, if you
choosed to install CJK fonts). Then just call the fonts in 'font-family'
using the names or aliases specified in fonts.xml.

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="test">
      <fo:region-body margin="20mm"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="test">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>Say something in Chinese.</fo:block>
      <fo:block font-family="Chinese">&#x8000;</fo:block>
      <fo:block>Great! Can you speak Japanese too?</fo:block>
      <fo:block
        font-family="Japanese">&#x3050;&#x3059;&#x305F;&#x308F;</fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

I'm not sure the font names "Chinese" and "Japanese" are original. It's
just two aliases in my CJK module. See your own fonts.xml.

I have only tried this with character entities, but I guess it should work
in plain text too. Perhaps one good exercise is to try writing a little
Chinese in a hexeditor to see how plain text Chinese works, unless you have
a Chinese editor comfortable with UTF-16. I haven't done that myself.

Note that these are Opentype fonts. The one time I needed to handle
Opentype fonts, the printing works wouln't accept it. I think there are
good Type 1 fonts to buy if you need.

Gusutawa

-------------------
By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



This archive was generated by hypermail 2.1.5 : Wed Dec 18 2002 - 08:41:28 PST