<title>Overview</title>
<p>
This page describes the
- <a href="http://en.wikipedia.org/wiki/Complex_scripts">complex scripts</a>
+ <link href="http://en.wikipedia.org/wiki/Complex_scripts">complex scripts</link>
features of Apache™ FOP, which include:
</p>
<ul>
sufficient. In these cases, an author may make use of the following XSL-FO constructs:
</p>
<ul>
- <li>The <a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#script"><code>script</code></a> property.</li>
- <li>The <a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#language"><code>language</code></a> property.</li>
- <li>The <a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#writing-mode"><code>writing-mode</code></a> property.</li>
+ <li>The <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#script"><code>script</code></link> property.</li>
+ <li>The <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#language"><code>language</code></link> property.</li>
+ <li>The <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#writing-mode"><code>writing-mode</code></link> property.</li>
<li>The number to string conversion properties:
- <a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#format"><code>format</code></a>,
- <a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#grouping-separator"><code>grouping-separator</code></a>,
- <a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#grouping-size"><code>grouping-size</code></a>,
- <a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#letter-value"><code>letter-value</code></a>,
+ <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#format"><code>format</code></link>,
+ <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#grouping-separator"><code>grouping-separator</code></link>,
+ <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#grouping-size"><code>grouping-size</code></link>,
+ <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#letter-value"><code>letter-value</code></link>,
and <code>fox:number-conversion-features</code>.</li>
- <li>The <a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override"><code>fo:bidi-override</code></a> element.</li>
+ <li>The <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override"><code>fo:bidi-override</code></link> element.</li>
<li>Explicit bidirectional control characters: U+200E LRM, U+200F RLM, U+202A LRE,
U+202B RLE, U+202C PDF, U+202D LRO, U+202E RLO.</li>
<li>Explicit join control characters: U+200C ZWNJ and U+200D ZWJ.</li>
</p>
<ol>
<li>If the FO element that governs the text specifies a
- <a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#script"><code>script</code></a>
+ <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#script"><code>script</code></link>
property and its value is not the empty string or <code>"auto"</code>, then that script is used.</li>
<li>Otherwise, the dominant script of the text is determined automatically by finding the
script whose constituent characters appear most frequently in the text.</li>
<p>In case the automatic algorithm does not produce the desired results, an author may
explicitly specify a <code>script</code> property with the desired script. If specified,
it must be one of the four-letter script code specified in
- <a href="http://unicode.org/iso15924/iso15924-codes.html">ISO 15924 Code List</a> or
- in the <a href="#extended_script_codes">Extended Script Codes</a> table. Comparison
+ <link href="http://unicode.org/iso15924/iso15924-codes.html">ISO 15924 Code List</link> or
+ in the <link href="#extended_script_codes">Extended Script Codes</link> table. Comparison
of script codes is performed in a case-insensitive manner, so it does not matter what case
is used when specifying these codes in an XSL-FO document.</p>
<section id="standard_script_codes">
language specific processing rules to be applied. For example, a font designed for the Arabic script may support
typographic variations according to whether the written language is Arabic, Farsi (Persian), Sindhi, Urdu, or
another language written with the Arabic script. In order to apply these language specific features, the author
- may explicitly mark the text with a <a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#language"><code>language</code></a>
+ may explicitly mark the text with a <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#language"><code>language</code></link>
property.</p>
<p>When specifying the <code>language</code> property, the value of the property must be either an
- <a href="http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes">ISO639-2 3-letter code</a> or an
- <a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">ISO639-1 2-letter code</a>. Comparison of language
+ <link href="http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes">ISO639-2 3-letter code</link> or an
+ <link href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">ISO639-1 2-letter code</link>. Comparison of language
codes is performed in a case-insensitive manner, so it does not matter what case is used when specifying these
codes in an XSL-FO document.</p>
</section>
<section id="writing_mode_property">
<title>Writing Mode Property</title>
+ <p>The <code>writing-mode</code> property is used to determine the axes and direction of the inline
+ progression direction, the block progression direction, the column progression direction (in tables
+ and flows), the shift direction, region placement, the resolution of writing-mode relative property
+ values (such as start, end, before, after), and the default block (paragraph) bidirectionality
+ level.
+ </p>
+ <p>The <code>writing-mode</code> property is inherited, so it can appear on any XSL-FO element type; however,
+ it applies (semantically) only to the following element types:
+ </p>
+ <ul>
+ <li><code>fo:page-sequence</code></li>
+ <li><code>fo:simple-page-master</code></li>
+ <li><code>fo:region-*</code></li>
+ <li><code>fo:block-container</code></li>
+ <li><code>fo:inline-container</code></li>
+ <li><code>fo:table</code></li>
+ </ul>
+ <p>If it is not specified on one of these element types, but is specified on an ancestor element, then the value specified on that
+ ancestor element (the inherited value) is used; otherwise, the initial value <code>lr-tb</code> is used.</p>
+ <p>At present, only the following values of the <code>writing-mode</code> property are supported:</p>
+ <ul>
+ <li><code>lr-tb</code></li>
+ <li><code>rl-tb</code></li>
+ <li><code>lr</code></li>
+ <li><code>rl</code></li>
+ </ul>
+ <p>Writing modes that employ a vertical inline progression direction are not yet supported.</p>
</section>
+ <!-- [TBD] - NEED TO DOCUMENT
<section id="number_conversion_properties">
<title>Number Conversion Properties</title>
</section>
+ -->
<section id="bidi_override_element">
<title>Bidi Override Element</title>
+ <p>The <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override"><code>fo:bidi-override</code></link>
+ element may be used to override default bidirectional processing behavior,
+ including default embedding levels and default character directionality. In the absence of either this element
+ or use of explicit <link href="#bidi_controls">Bidi Control Characters</link>, the default behavior prescribed
+ by the <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override">Unicode Bidirectional Algorithm</link>
+ applies.
+ </p>
</section>
<section id="bidi_controls">
<title>Bidi Control Characters</title>
+ <p>In addition to the use of the <link href="#bidi_override_element">Bidi Override Element</link>, an author
+ may make use of the following explicit Unicode Bidi Control Characters:</p>
+ <ul>
+ <li>U+200E - LEFT-TO-RIGHT MARK (LRM)</li>
+ <li>U+200F - RIGHT-TO-LEFT MARK (RLM)</li>
+ <li>U+202A - LEFT-TO-RIGHT EMBEDDING (LRE)</li>
+ <li>U+202B - RIGHT-TO-LEFT EMBEDDING (RLE)</li>
+ <li>U+202C - POP DIRECTIONAL FORMATTING (PDF)</li>
+ <li>U+202D - LEFT-TO-RIGHT OVERRIDE (LRO)</li>
+ <li>U+202E - RIGHT-TO-LEFT OVERRIDE (RLO)</li>
+ </ul>
+ <p>If an embedding or override is not terminated (using U+202C PDF) prior to the end of a
+ <link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#d0e4879">delimited text range</link>,
+ then it is automatically terminated by FOP.
+ </p>
</section>
<section id="join_controls">
<title>Join Control Characters</title>
+ <p>In order to prevent joining behavior in contexts where joining occurs by default,
+ for example, between U+0628 ARABIC LETTER BEH and U+0646 ARABIC LETTER NOON,
+ an author may used a U+200C ZERO WIDTH NON-JOINER (ZWNJ).
+ </p>
+ <p>Conversely, in order to force joining behavior in contexts where joining does not occur by default,
+ for example, between U+0628 ARABIC LETTER BEH and U+0020 SPACE, an author may used a U+200D ZERO WIDTH JOINER (ZWJ).
+ </p>
+ <p>The behavior of ZWNJ and ZWJ is script specific. See
+ <link href="http://www.unicode.org/versions/Unicode6.1.0/ch08.pdf">The Unicode Standard, Chapter 8,
+ Middle Eastern Scripts</link> for information on the use of these control characters with the Arabic
+ script. See
+ <link href="http://www.unicode.org/versions/Unicode6.1.0/ch09.pdf">The Unicode Standard, Chapter 9,
+ South Asian Scripts - I</link> for information on the use of these control characters with common
+ Indic scripts.
+ </p>
</section>
</section>
<section id="supported_scripts">
<th style="text-align:left">Comments</th>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Arabic_alphabet">Arabic</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Arabic_alphabet">Arabic</link></td>
<td class="yes">full</td>
<td class="yes">full</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Bengali_alphabet">Bengali</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Bengali_alphabet">Bengali</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Burmese_alphabet">Burmese</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Burmese_alphabet">Burmese</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Devanagari_alphabet">Devanagari</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Devanagari_alphabet">Devanagari</link></td>
<td class="partial">partial</td>
<td class="partial">partial</td>
<td style="text-align:left">join controls (ZWJ, ZWNJ) not yet supported</td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Khmer_alphabet">Khmer</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Khmer_alphabet">Khmer</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Gujarati_alphabet">Gujarati</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Gujarati_alphabet">Gujarati</link></td>
<td class="partial">partial</td>
<td class="no">none</td>
<td style="text-align:left">pre-alpha</td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Gurmukhī_alphabet">Gurmukhi</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Gurmukhī_alphabet">Gurmukhi</link></td>
<td class="partial">partial</td>
<td class="no">none</td>
<td style="text-align:left">pre-alpha</td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Hebrew_alphabet">Hebrew</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Hebrew_alphabet">Hebrew</link></td>
<td class="yes">full</td>
<td class="partial">partial</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Kannada_alphabet">Kannada</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Kannada_alphabet">Kannada</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Lao_alphabet">Lao</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Lao_alphabet">Lao</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Malayalam_alphabet">Malayalam</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Malayalam_alphabet">Malayalam</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Mongolian_script">Mongolian</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Mongolian_script">Mongolian</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Oriya_script">Oriya</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Oriya_script">Oriya</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Tamil_alphabet">Tamil</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Tamil_alphabet">Tamil</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Telugu_alphabet">Telugu</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Telugu_alphabet">Telugu</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Tibetan_alphabet">Tibetan</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Tibetan_alphabet">Tibetan</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
</tr>
<tr>
- <td><a href="http://en.wikipedia.org/wiki/Thai_alphabet">Thai</a></td>
+ <td><link href="http://en.wikipedia.org/wiki/Thai_alphabet">Thai</link></td>
<td class="no">none</td>
<td class="no">none</td>
<td></td>
<th style="text-align:left">Comments</th>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/family.aspx?FID=24">Arial Unicode MS</a></td>
- <td class="yes" style="text-align:left"><a href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1081">1.01</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/family.aspx?FID=24">Arial Unicode MS</link></td>
+ <td class="yes" style="text-align:left"><link href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1081">1.01</link></td>
<td style="text-align:center">50377</td>
<td>limited GPOS support</td>
</tr>
<tr>
- <td><a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ArabicFonts">Lateef</a></td>
+ <td><link href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ArabicFonts">Lateef</link></td>
<td class="yes" style="text-align:left">1.0</td>
<td style="text-align:center">1147</td>
<td>language features for Kurdish (KUR), Sindhi (SND), Urdu (URD)</td>
</tr>
<tr>
- <td><a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ArabicFonts">Scheherazade</a></td>
+ <td><link href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ArabicFonts">Scheherazade</link></td>
<td class="yes" style="text-align:left">1.0</td>
<td style="text-align:center">1197</td>
<td>language features for Kurdish (KUR), Sindhi (SND), Urdu (URD)</td>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/family.aspx?FID=261">Simplified Arabic</a></td>
- <td class="no" style="text-align:left"><a href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=867">1.01</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/family.aspx?FID=261">Simplified Arabic</link></td>
+ <td class="no" style="text-align:left"><link href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=867">1.01</link></td>
<td/>
<td>contains invalid, out of order coverage table entries</td>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/font.aspx?FID=261">Simplified Arabic</a></td>
- <td class="yes" style="text-align:left"><a href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1645">5.00</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/font.aspx?FID=261">Simplified Arabic</link></td>
+ <td class="yes" style="text-align:left"><link href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1645">5.00</link></td>
<td style="text-align:center">414</td>
<td>lacks GPOS support</td>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/font.aspx?FID=261">Simplified Arabic</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/font.aspx?FID=261">Simplified Arabic</link></td>
<td class="yes" style="text-align:left">5.92</td>
<td style="text-align:center">473</td>
<td>includes GPOS for advanced position adjustment</td>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/family.aspx?FID=264">Traditional Arabic</a></td>
- <td class="yes" style="text-align:left"><a href="http://www.microsoft.com/typography/fonts/family.aspx?FMID=877">1.01</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/family.aspx?FID=264">Traditional Arabic</link></td>
+ <td class="yes" style="text-align:left"><link href="http://www.microsoft.com/typography/fonts/family.aspx?FMID=877">1.01</link></td>
<td style="text-align:center">530</td>
<td>lacks GPOS support</td>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/font.aspx?FID=264">Traditional Arabic</a></td>
- <td class="yes" style="text-align:left"><a href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1658">5.00</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/font.aspx?FID=264">Traditional Arabic</link></td>
+ <td class="yes" style="text-align:left"><link href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1658">5.00</link></td>
<td style="text-align:center">530</td>
<td>lacks GPOS support</td>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/font.aspx?FID=264">Traditional Arabic</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/font.aspx?FID=264">Traditional Arabic</link></td>
<td class="yes" style="text-align:left">5.92</td>
<td style="text-align:center">589</td>
<td>includes GPOS for advanced position adjustment</td>
<th style="text-align:left">Comments</th>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/family.aspx?FID=370">Aparajita</a></td>
- <td class="yes" style="text-align:left"><a href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1700">1.00</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/family.aspx?FID=370">Aparajita</link></td>
+ <td class="yes" style="text-align:left"><link href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1700">1.00</link></td>
<td style="text-align:center">706</td>
<td/>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/family.aspx?FID=374">Kokila</a></td>
- <td class="yes" style="text-align:left"><a href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1749">1.00</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/family.aspx?FID=374">Kokila</link></td>
+ <td class="yes" style="text-align:left"><link href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1749">1.00</link></td>
<td style="text-align:center">706</td>
<td/>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/family.aspx?FID=243">Mangal</a></td>
- <td class="yes" style="text-align:left"><a href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1759">5.01</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/family.aspx?FID=243">Mangal</link></td>
+ <td class="yes" style="text-align:left"><link href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1759">5.01</link></td>
<td style="text-align:center">885</td>
<td>designed for use in user interfaces</td>
</tr>
<tr>
- <td><a href="http://www.microsoft.com/typography/fonts/family.aspx?FID=384">Utsaah</a></td>
- <td class="yes" style="text-align:left"><a href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1811">1.00</a></td>
+ <td><link href="http://www.microsoft.com/typography/fonts/family.aspx?FID=384">Utsaah</link></td>
+ <td class="yes" style="text-align:left"><link href="http://www.microsoft.com/typography/fonts/font.aspx?FMID=1811">1.00</link></td>
<td style="text-align:center">706</td>
<td/>
</tr>
described above:
</p>
<ul>
- <li><a href="http://www.unicode.org/">The Unicode Standard</a></li>
- <li><a href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override">Unicode Bidirectional Algorithm</a></li>
- <li><a href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType Advanced Typographic Extensions</a></li>
- <li><a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=CmplxRndExamples">Examples of Complex Rendering</a></li>
+ <li><link href="http://www.unicode.org/">The Unicode Standard</link></li>
+ <li><link href="http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override">Unicode Bidirectional Algorithm</link></li>
+ <li><link href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType Advanced Typographic Extensions</link></li>
+ <li><link href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=CmplxRndExamples">Examples of Complex Rendering</link></li>
</ul>
</section>
</body>