This is not a restriction of DocBook. Normally the font-family property in XSL-FO output is populated with a comma-separated list of fonts, not a single font. The 'body.fontset' internal parameter is used for body text, and it is set in fo/pagesetup.xsl by combining the body.font.family value and the symbol.font.family value, as described here:

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

So this should already be working for you. Can you take a peek inside your FO output and see what the value of the font-family property on fo:root looks like? It should include your body font and symbol font in the list. If you are overriding the 'body.fontset' parameter, then you may not get a list.

When XEP looks for a character, if it can't find one in the body font, it should then look in the next font in the list. That is, if font-selection-strategy="character-by-character" is also set (it is by default, in the 'root.properties' attribute set in param.xsl).

Bob Stayton
Sagehill Enterprises
b...@sagehill.net


----- Original Message ----- From: "Ron Catterall" <r...@catterall.net>
To: "docbook-apps" <docbook-apps@lists.oasis-open.org>
Sent: Saturday, June 05, 2010 8:00 AM
Subject: [docbook-apps] Font problem - need 2 font files in Docbook


Am I missing something or is this a real restriction in Docbook

In text body I have two symbols which (as far as I can see) never occur in the same font file - specifically the old english yogh (&#x021D;) and the logical symbol implies (&#x21D2; ISOtech suggests using this for 'implies'). (Gentium say that eventually they will both be included, but not yet.)

Using XEP 4.18, in my xep.xml file I have:

      <font-family name="Symbol">
        <font><font-data afm="Symbol.afm"/></font>
      </font-family>

which contains 'implies' (&#x21D2;) and is built in to Acrobat and

      <font-group xml:base="file:/Library/Fonts/" label="TrueType" embed="true">
      <font-family name="Cardo">
        <font><font-data ttf="Cardo98s.ttf"/></font>
      </font-family>

which I embed in the PDF output and which contains 'yogh' (&#x021D;)

In my Docbook customization file I have:

<xsl:param name="body.font.family" select="'Cardo'" />
<xsl:param name="body.font.size" select="'11pt'" />
<xsl:param name="title.font.family" select="'Cardo'" />
<xsl:param name="footnote.font.size" select="'90%'" />
<xsl:param name="footnote.font.family" select="'Cardo'" />
<xsl:param name="alignment" select="'justify'" />

in the PDF output 'yogh' appears correctly, but 'implies' does not.

If I reset body.font.family to the Docbook default (eliminating the above customization) I get the 'implies' (&#x21D2;) correctly, but lose the 'yogh' (&#x021D;)

I have entities defined and know that the entity file is accessed.

<!ENTITY  yogh "&#x021D;">    <!--   lower case yogh -->
<!ENTITY  rArr "&#x21D2;">    <!-- rightwards double arrow -->

I cannot see any way in Docbook to change the body.font.family for a single body character, or to specify a secondary body.font.family to be used if a character is not found in the first one.


--
Ron Catterall Ph.D. D.Sc.
r...@catterall.net
http://catterall.net



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org

Reply via email to