This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

i18n and fo 1.29


Hi, all.

I've been working on getting the "current" release (as opposed to the stated 
experimental release), version 1.29, working with Japanese.

jpfop worked fine with the supplied .fo examples, but not with the 
DocBook->FO style transforms.  After investigating, I determined that it was 
because of the default fonts.

The first thing I did was set the fonts in param.xsl to known working 
Japanese fonts.  This got my task to compile a little further, but it still 
failed.  Looking at the .fo file, I found that the fo:root object still had a 
font-family="Times Roman" despite my changing all of the params.

Further investigation showed a number of places where fixed fonts were used 
instead of parameter fonts.  So I went through and "fixed" them.

The included patch/diff is from the 1.29 release with fo:root's font-family 
set to {$body.font.family} and a number of monospace objects set to 
{$monospace.font.family}.

With this and jpfop (and by setting the fonts in param.xsl), contrary to what 
many web pages say, DocBook --> PDF is now possible in Japanese. 

Has this been fixed in the "experimental" version?  And would you recommend 
moving to it form 1.29?

-- 
Michael Westbay
Work: Beacon-IT http://www.beacon-it.co.jp/
Home:           http://www.seaple.icc.ne.jp/~westbay
Commentary:     http://www.japanesebaseball.com/
diff -p fo.1_29/docbook.xsl fo/docbook.xsl
*** fo.1_29/docbook.xsl	Mon Jun  4 20:26:08 2001
--- fo/docbook.xsl	Mon Jun  4 20:31:27 2001
***************
*** 102,108 ****
                          |*[1]/sectioninfo
                          |*[1]/sect1info"/>
  
!   <fo:root font-family="Times Roman"
             font-size="12pt"
             text-align="justify">
      <xsl:call-template name="setup.pagemasters"/>
--- 102,108 ----
                          |*[1]/sectioninfo
                          |*[1]/sect1info"/>
  
!   <fo:root font-family="{$body.font.family}"
             font-size="12pt"
             text-align="justify">
      <xsl:call-template name="setup.pagemasters"/>
diff -p fo.1_29/inline.xsl fo/inline.xsl
*** fo.1_29/inline.xsl	Mon Jun  4 20:26:08 2001
--- fo/inline.xsl	Mon Jun  4 20:34:01 2001
***************
*** 24,30 ****
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
!   <fo:inline font-family="monospace">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
--- 24,30 ----
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
!   <fo:inline font-family="{$monospace.font.family}">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
***************
*** 51,57 ****
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
!   <fo:inline font-weight="bold" font-family="monospace">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
--- 51,57 ----
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
!   <fo:inline font-weight="bold" font-family="{$monospace.font.family}">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
***************
*** 60,66 ****
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
!   <fo:inline font-style="italic" font-family="monospace">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
--- 60,66 ----
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
!   <fo:inline font-style="italic" font-family="{$monospace.font.family}">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
diff -p fo.1_29/synop.xsl fo/synop.xsl
*** fo.1_29/synop.xsl	Mon Jun  4 20:26:08 2001
--- fo/synop.xsl	Mon Jun  4 20:36:45 2001
***************
*** 145,151 ****
  </xsl:template>
  
  <xsl:template match="funcprototype">
!   <fo:block font-family="monospace">
      <xsl:apply-templates/>
      <xsl:if test="$funcsynopsis.style='kr'">
        <xsl:apply-templates select="./paramdef" mode="kr-funcsynopsis-mode"/>
--- 145,151 ----
  </xsl:template>
  
  <xsl:template match="funcprototype">
!   <fo:block font-family="{$monospace.font.family}">
      <xsl:apply-templates/>
      <xsl:if test="$funcsynopsis.style='kr'">
        <xsl:apply-templates select="./paramdef" mode="kr-funcsynopsis-mode"/>
***************
*** 154,160 ****
  </xsl:template>
  
  <xsl:template match="funcdef">
!   <fo:inline font-family="monospace">
      <xsl:apply-templates/>
    </fo:inline>
  </xsl:template>
--- 154,160 ----
  </xsl:template>
  
  <xsl:template match="funcdef">
!   <fo:inline font-family="{$monospace.font.family}">
      <xsl:apply-templates/>
    </fo:inline>
  </xsl:template>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]