I agree with Lex statement

> Docbook, and therefore asciidoc is a *content* markup, not a
> presentation markup. So asciidoc doesn't know anything about fonts or
> other presentation information.

user should not force font changes within the document.
At same time, I have similar problem of Chris Jones

> When I'm writing a document in English comprising quotes from say
> Russian and ancient Greek, I need to know how I can switch to a quality
> Russian font and then back to my standard English font, and then switch
> again to a nice Greek font.

My documents are mainly in English but full of Chinese words.

On top of this, I want to use "fop" as print formatter in place of
"dblatex".
"fop" is still not fully compliant with XLS-FO standard. Compliance
page reports
http://xmlgraphics.apache.org/fop/compliance.html#fo-property-font-family
"font-family lists are allowed but glyph based font selection is not
supported".

"fop" does not search the glyph in the "font-family" list, but just
use the glyphs within the first font in the list.
I have to *globally* select only one font for the whole document body.
Even harder to mix English and Chinese text.

Below the solution I'm using.
Thanks to Lex for pointing the right direction.

Best Regards,
Antonio Borneo

I use command:
    a2x -f pdf --fop --xsl-file=my_fo.xsl top.txt

The file "my_fo.xsl" is a wrapper around default /etc/.../fo.xsl:
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <xsl:import href="/etc/asciidoc/docbook-xsl/fo.xsl"/>
  <xsl:template match="phrase[@role='zh']">
    <fo:inline font-family="UMingCN">
      <xsl:apply-templates/>
    </fo:inline>
  </xsl:template>
</xsl:stylesheet>

In my document I switch to Chinese font ("UMingCN" in this case)
typing:
    this is English while [zh]#this is Chinese# and this is back
English.

The wrapper can be easily extended to support Russian and ancient
Greek ;)

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to