<?xml version="1.0" encoding="utf-8"?><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:rx="http://www.renderx.com/XSL/Extensions">
<!-- ============================================================ -->
<!--                                                              -->
<!-- 	This file makes a part of RenderX XSL Test Suite          -->
<!--                                                              -->
<!--    Author: Alexander Peshkov                                 -->
<!--                                                              -->
<!--    (c) RenderX, 2003                                         -->
<!--                                                              -->
<!-- ============================================================ --><fo:layout-master-set><fo:simple-page-master master-name="document-master" margin="0.4in"><fo:region-body margin="20pt" padding="0pt"/></fo:simple-page-master></fo:layout-master-set><fo:page-sequence master-reference="document-master"><fo:flow flow-name="xsl-region-body" padding="6pt">
   
  <fo:block font="bold 16pt Helvetica" space-before="16pt" space-after="16pt" text-align="center" span="all">Fonts embedding</fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    RenderX XEP allows you to use several types of fonts in your document:
    Adobe standard Latin fonts, PostScript Type 1 fonts,
    OpenType fonts (CID-based OpenType fonts are supported for PDF output only; subsetting is not implemented yet),
    TrueType fonts (PDF output only).
    In general, to configure a font you must add the appropriate record in XEP configuration file (xep.xml):
    <fo:block white-space="pre" font-family="monospace">
    &lt;font-group
          xml:base="file:/path_to_font/" 
          label="MyFont Group"&gt;
      &lt;font-family name="MyFont" embed="true" subset="true"&gt;
        &lt;font&gt;
          &lt;font-data ttf="MyFont-Regular"/&gt;
        &lt;/font&gt;
        &lt;font style="oblique"&gt;
          &lt;font-data ttf="MyFont-Italic"/&gt;
        &lt;/font&gt;
        &lt;font weight="bold"&gt;
          &lt;font-data ttf="MyFont-Bold"/&gt;
        &lt;/font&gt;
        &lt;font weight="bold" style="oblique"&gt;
          &lt;font-data ttf="MyFont-BoldItalic"/&gt;
        &lt;/font&gt;
      &lt;/font-family&gt;
    &lt;/font-group&gt;
    </fo:block>
    Detailed information about fonts usage can be found in XEP documentation included in the distribution.
    <fo:block font-size="12pt" font-style="italic" space-before="6pt" space-after="6pt">
      XEP 4.0 Reference for Java, section 2.4 "Fonts Configuration" (reference.pdf)
    </fo:block>
  </fo:block>
  <fo:block font="bold 12pt Helvetica" space-before="10pt" space-after="10pt" text-align="left" keep-with-next="always">Embedded Type 1 font</fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    As an example we will embed Cyrillic handwriting font
    (PT Pushkin) with an old orthography.
    To use this font we place it in the fonts directory specified by xml:base attribute
    (on the parent font-group element) and add the following code into xep.xml:
    <fo:block white-space="pre" font-family="monospace">
    &lt;font-family name="Pushkin" embed="true"&gt;
      &lt;font style="italic"&gt;
        &lt;font-data afm="Pushkin.afm"
                   pfa="Pushkin.pfa"
                   glyph-list="Pushkin.glyphs"/&gt;
      &lt;/font&gt;
    &lt;/font-family&gt;
    </fo:block>
    As specified by <fo:wrapper font-family="monospace">embed</fo:wrapper> property this font will be embedded in the resulting document.
    Take note of the presence of <fo:wrapper font-family="monospace">glyph-list</fo:wrapper> attribute, which provides glyph list registration.
    This is necessary since this font has non-standard glyph names.
    The following paragraph has <fo:wrapper font-family="monospace">font-family="Pushkin"</fo:wrapper> attribute and will be rendered using this font.
  </fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt" font-family="Pushkin">
    абвг
    абвг
  </fo:block>
  <fo:block font="bold 12pt Helvetica" space-before="10pt" space-after="10pt" text-align="left" keep-with-next="always">External Type1 font</fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    An examplary configuration of a non-embedded Type 1 font:
    <fo:block white-space="pre" font-family="monospace">
    &lt;font-family name="Zapf Chancery" embed="false"&gt;
      &lt;font style="italic"&gt;
        &lt;font-data afm="uzcmi8a.afm" pfa="uzcmi8a.pfa"/&gt;
      &lt;/font&gt;
    &lt;/font-family&gt;
    </fo:block>
    Since this font is not embedded it must be available on the target system
    in order to make the output look like expected.
    The paragraph below has <fo:wrapper font-family="monospace">font-family="ZapfChancery"</fo:wrapper>
    attribute and will be rendered using this font.
  </fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt" font-family="ZapfChancery">
    Rosa fresca aulentissima        ch’apari inver’ la state
    le donne ti disïano,        pulzell’ e maritate:
    tràgemi d’este focora,        se t’este a bolontate;
    per te non ajo abento notte e dia,
    penzando pur di voi, madonna mia.
  </fo:block>
  <fo:block font="bold 12pt Helvetica" space-before="10pt" space-after="10pt" text-align="left" keep-with-next="always">Embedded TrueType font</fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    TrueType fonts in XEP can be used with PDF generator only; these fonts must be Unicode-enabled.
    An examplary configuration of an embedded ArialMT TrueType font looks as follows:
    <fo:block white-space="pre" font-family="monospace">
    &lt;font-family name="Arial" embed="true" subset="true"&gt;
      &lt;font&gt;
        &lt;font-data ttf="arial.ttf"/&gt;
      &lt;/font&gt;
      &lt;font style="oblique"&gt;
        &lt;font-data ttf="ariali.ttf"/&gt;
      &lt;/font&gt;
      &lt;font weight="bold"&gt;
        &lt;font-data ttf="arialbd.ttf"/&gt;
      &lt;/font&gt;
      &lt;font weight="bold" style="oblique"&gt;
        &lt;font-data ttf="arialbi.ttf"/&gt;
      &lt;/font&gt;
    &lt;/font-family&gt;
    &lt;font-alias name="ArialMT" value="Arial"/&gt;
    </fo:block>
    Each font attribute (<fo:wrapper font-family="monospace">font-weight</fo:wrapper>/<fo:wrapper font-family="monospace">font-style</fo:wrapper>) requires a separate <fo:wrapper font-family="monospace">font</fo:wrapper> record in xep.xml.
    The <fo:wrapper font-family="monospace">subset</fo:wrapper> attribute controls font subsetting.
    An embedded TrueType font can be subsetted: instead of storing the entire font in the document,
    it is possible to leave only those glyphs that are actually used in the text.
    This option reduces the output document size but makes it unsuitable for subsequent editing.
    The following paragraph has <fo:wrapper font-family="monospace">font-family="ArialMT"</fo:wrapper> attribute and will be rendered using this font.
  </fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt" font-family="ArialMT">
    This is the title "Tevie the Milkman" in Yiddish:
    טעװיע דער מילכיקער
  </fo:block>
  
  <fo:block font="bold 12pt Helvetica" space-before="10pt" space-after="10pt" text-align="left" keep-with-next="always">OpenType font</fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt">
    You can use OpenType fonts (for example, Adobe fonts from Acrobat CJK packs).
    Those fonts are supported in PDF output only. As an example we will configure
    OpenType fonts included in the Adobe Asian Font Packs for Acrobat versions 4, 5, and 6:
    <fo:block white-space="pre" font-family="monospace">
    &lt;font-group 
          xml:base="path_to_Adobe_fonts/"
          label="Adobe OpenType"
          embed="true"
          subset="false"&gt;
      &lt;font-family name="Kozuka Mincho Pro Acro R"&gt;
        &lt;font&gt;
          &lt;font-data ttf="KozMinPro-Regular-Acro.otf"/&gt;
        &lt;/font&gt;
      &lt;/font-family&gt;
      &lt;font-alias name="KozMinPro" value="KozukaMinchoProAcroR"/&gt;
    &lt;/font-group&gt;
    </fo:block>
    Note that fonts themselves are not included in the distribution, and shall be made visible to the formatter in order to use them.
    The following paragraph has <fo:wrapper font-family="monospace">font-family="KozMinPro"</fo:wrapper> attribute and will be rendered using this font.
  </fo:block>
  <fo:block font-size="12pt" space-before="6pt" space-after="6pt" text-align="justify" text-indent="16pt" font-family="KozMinPro">
    日本日本
    日本日本
  </fo:block>
</fo:flow></fo:page-sequence></fo:root>