Menu

#10 fop-font-metrics.jar to export PDF with CJK

scheduled_for_2.0
open
5
2020-11-18
2005-03-06
No

I appended font-metrics for using "Cyberbit.ttf" &
"Cybercjk.ttf" to fop-font-metrics.jar.

[Usage]

  1. Download Font Files; "Cyberbit.ZIP" and/or
    "Cybercjk.ZIP" (caution:they are fat and heavy!!)from

ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/

  1. unzip Font Files and move to $JRE_HOME\lib\fonts.

  2. download fop-font-metrics.jar(attached here) and
    replace original
    one($GanttProject_HOME\lib\fop-font-metrics.jar).

  3. create/edit and set xslfo(PDF export Theme).
    4.1. specify "font-family" attribute.
    e.g.) ganttproject.xsl(supplied in souce package;
    data\resources\xslfo)

<xsl:variable name="font" select="'Bitstream CyberCJK'">
or
<xsl:variable name="font" select="'Bitstream Cyberbit"></xsl:variable></xsl:variable>

4.2. set a new PDF export Theme.

I tested with Japanese Characters on follow environment

  • GanttProject: 1.10.3
  • OS:Windows XP
  • JRE: 1.5.0_01

Please try to test my work.

Discussion

  • RyuheiTerada

    RyuheiTerada - 2005-03-07

    Logged In: YES
    user_id=1227443

    Sorry. I failed to attach file so do it again.

     
    • Anonymous

      Anonymous - 2020-11-18
      Post awaiting moderation.
  • RyuheiTerada

    RyuheiTerada - 2005-03-07

    Logged In: YES
    user_id=1227443

    My file is too big to attach. then I supply row font metrics
    files package. We can append new font-metrics; follow steps

    1. unpack my archive; then appear "font-metrics" directory
      including 2 files("Cyberbit.ttf.xml" and "Cybercjk.ttf.xml").

    2. move "font-metrics" directory to $GanttProject_HOME\lib.

    3. modify existing "fop-font-metrics.jar" to run jar command;
      $ %JAVA_HOME%\bin\jar uvf fop-font-metrics.jar font-metrics

     
  • RyuheiTerada

    RyuheiTerada - 2005-03-07

    row font metrics archive.

     
  • idax

    idax - 2006-09-09

    Logged In: YES
    user_id=1594086

    This method doesn't work on 2.0.2 though it worked on 2.0-pre3.
    Character strings are displayed like "####" in the PDF.

     
  • Hugh Chen

    Hugh Chen - 2006-12-15

    Logged In: YES
    user_id=1422737
    Originator: NO

    I tested with 2.0.2 and it works.
    Thanks very much for this patch.
    My environment as following:

    OS: Linux(Ubuntu Dapper)
    JDK: IBM JDK 1.5.0 for linux
    Ganttproject: 2.0.2

     
  • RyuheiTerada

    RyuheiTerada - 2008-02-06

    Logged In: YES
    user_id=1227443
    Originator: YES

    The patch for sazanami-font has been opened to the public in following URL.
    http://tera-com.fromc.jp/blog/tera-com/temp/org.ganttproject.impex.htmlpdf_2.0.zip

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB