OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] How to change the font?


I use Arial Unicode MS too as a backup symbol font.  You can add it to the 
stylesheet parameter named symbol.font.family as described here:

http://www.sagehill.net/docbookxsl/SpecialChars.html

It becomes a fallback font if a character isn't in your main font.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Keith Fahlgren" <keith@audiobeta.com>
To: "Darya Said-Akbari" <darya_akbari@yahoo.com>
Cc: <docbook-apps@lists.oasis-open.org>
Sent: Thursday, November 09, 2006 9:58 AM
Subject: Re: [docbook-apps] How to change the font?


> On 11/9/06, Darya Said-Akbari <darya_akbari@yahoo.com> wrote:
>> is there a way I can change the font in my DocBook
>> XML. Sometimes I want use Unicode characters but the
>> font does not cover these characters.
>>
>> In such cases I want to select the right font which
>> handles these Unicode characters.
>
> Hi,
>
> We've run into this problem quite a bit. In our case, we use
> Microsoft's Arial, which offers fairly large coverage of Unicode. The
> markup we use is the <phrase> tag with a @role="unicode", which is
> nice and semanitcally meaningless:
>
> <para>Regular text here <phrase role="unicode"> 松本 行弘</phrase>  more
> normal stuff</para>
>
> I match this like so:
> <xsl:template match="phrase">
>    <xsl:variable name="depth">
>      <xsl:call-template name="dot.count">
>        <xsl:with-param name="string">
>          <xsl:number level="multiple"/>
>        </xsl:with-param>
>      </xsl:call-template>
>    </xsl:variable>
>   <xsl:choose>
>    <xsl:when test="@role[contains(., 'unicode')]">
>        <fo:inline font-family="Arial Unicode MS"> <!-- whatever font
> you like -->
>          <xsl:call-template name="inline.charseq"/>
>        </fo:inline>
>      </xsl:when>
>      <xsl:otherwise>
>        <xsl:choose>
>          <xsl:when test="$depth mod 2 = 1">
>            <fo:inline font-style="normal">
>              <xsl:apply-templates/>
>            </fo:inline>
>          </xsl:when>
>          <xsl:otherwise>
>            <xsl:call-template name="inline.italicseq"/>
>          </xsl:otherwise>
>        </xsl:choose>
>      </xsl:otherwise>
>    </xsl:choose>
>  </xsl:template>
> </xsl:template>
>
>
> HTH,
> Keith
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]