xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lev T <guidi...@gmail.com>
Subject Re: Asian fonts in pdfs
Date Sun, 07 May 2006 11:07:28 GMT
If those documents use Unicode charsets, a possible solution is to embed ttf 
font contains needed charsets into PDF. I am using DFSG-free version 
of "kochi" font family for asian languages.

To embed fonts first prepare font map xml using provided with fop tool:
 fop-ttfreader kochi-gothic.ttf kochi-gothic.xml

Create config file with font map settings. Here my config file cnf.xml:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <fonts>
    <font metrics-file="/pathto/kochi-gothic.xml" 
embed-file="/usr/share/fonts/truetype/kochi/kochi-gothic.ttf" kerning="yes">
      <font-triplet name="Kochi Gothic" style="normal"  weight="normal"/>
      <font-triplet name="Kochi Gothic" style="italic"  weight="normal"/>
      <font-triplet name="Kochi Gothic" style="normal"  weight="bold"/>
      <font-triplet name="Kochi Gothic" style="italic"  weight="bold"/>
    </font>
  </fonts>

  <!-- To use embeded fonts in SVG too: -->
  <entry>
    <key>strokeSVGText</key>
     <value>false</value>
  </entry>
</configuration>

Then when you want to "fop":
 fop -c cnf.xml -fo data.fo -pdf document.pdf

On Saturday 06 May 2006 18:48 pm, Matthew East wrote:
> Hi all,
>
> I'm trying to build (using fop 0.20-5) some pdfs of some guides which are
> in Asian languages (Taiwanese, Chinese, Korean etc) and the resulting pdfs
> don't show any of the characters, just hash symbols. Does anyone know how I
> can improve this situation?
>
> I've put an example .fo file and the resulting .pdf file at this address:
>
> http://mdke.org/ubuntu/fop/
>
> Hope you can help!
>
> Thanks, Matt
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

-- 
Regards,
Lev T.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message