<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
<document filename="test_030_codepages.pdf" invariant="1">
	<docinit>
    	<registerTTFont faceName="Vera" fileName="Vera.ttf" />
    	<registerTTFont faceName="VeraBold" fileName="VeraBd.ttf" />
		<registerTTFont faceName="Luxi" fileName="luxiserif.ttf"/>
	</docinit>
	<template pageSize="letter" leftMargin="72" showBoundary="1">
		<pageTemplate id="main" pageSize="(595,842)">
			<pageGraphics>
				<setFont name="Helvetica-BoldOblique" size="18"/>
				<drawRightString x="523" y="800">RML2PDF Test Suite #23 - Code Pages&#174; </drawRightString>
			</pageGraphics>
			<frame id="first" x1="1in" y1="1in" width="6in" height="9in"/>
		</pageTemplate>
	</template>
	<stylesheet>
		<paraStyle name="h1" fontName="VeraBold" fontSize="32" leading="36"/>
		<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12" spaceBefore="6"/>
		<paraStyle name="truetype" fontName="Vera" fontSize="10" leading="12" spaceBefore="6"/>
		<paraStyle name="luxi" fontName="Luxi" fontSize="10" leading="12" spaceBefore="6" />
		<paraStyle name="rjust" parent="normal" fontName="VeraBold" alignment="RIGHT"/>
	</stylesheet>
	<story>
		<para style="h1">Unicode Tests</para>
		<para style="normal">In version 2.0 of the ReportLab library and later, all RML input is
strictly UTF8 - the default standard for XML files.  This considerably simplifies things compared to 
version 1.0, where you had to encode data to match the fonts.</para>
		<para style="normal">Most good editors can be configured to display UTF8 characters.  To see
		non-Latin characters, you'll need to make sure you use a multilingual font.</para>
		<blockTable>
			<blockTableStyle id="0002">
				<lineStyle kind="GRID" colorName="black"/>
				<blockBottomPadding length="0"/>
				<blockTopPadding length="3"/>
			</blockTableStyle>
			<tr>
				<td>Brazilian (Portuguese)</td>
				<td>English</td>
			</tr>
			<tr>
				<td>maçã</td>
				<td>apple</td>
			</tr>
			<tr>
				<td>abóbora </td>
				<td>pumpkin</td>
			</tr>
			<tr>
				<td>pé </td>
				<td>foot</td>
			</tr>
			<tr>
				<td>limão </td>
				<td/>
			</tr>
			<tr>
				<td>limões </td>
				<td>lemons</td>
			</tr>
			<tr>
				<td>maracujá </td>
				<td>passion fruit</td>
			</tr>
		</blockTable>
		<para style="normal">The above table should display the names of various fruits, which
		contain accents.  These are in Helvetica, a Type 1 font.</para>

		<para style="normal">This paragraph is in Helvetica, a Type 1 font.  You should see trademark (&#x2122;),
		copyright (&#x00a9;) and registered (&#x00ae;) characters.  Ole!</para>
		<para style="truetype">This paragraph is in Vera, a TrueType font.  You should see trademark (&#x2122;),
		copyright (&#x00a9;) and registered (&#x00ae;) characters.  Ole!</para>
		<para style="luxi">This paragraph is in Luxi, a TrueType font.  You should see trademark (&#x2122;),
		copyright (&#x00a9;) and registered (&#x00ae;) characters. Ole!</para>

		<para style="normal">
		</para>

		
		<para style="normal">Characters in UTF8 can always be represented with XML numeric 
entity codes.  Thus, the character 'A' can be shown with the decimal escape sequence "&amp;#65;"
in the document source, or the hex sequence "&amp;#x41;".  Here we go, should get three As:  &#65; &#x41; &#x0041;.
Trademark can be written as &amp;#x2122;, copyright as &amp;#x00a9;, and registered as &amp;#x00ae;. </para>

		<para style="normal">There are some other non-paragraph contexts for text display -
drawing strings directly, and placing strings (not paragraphs) in table cells.  The title
at the top should have a &#174; symbol at the right, and all three should appear in
the table below:</para>
		<spacer length="24"/>
		<blockTable>
			<blockTableStyle id="0001">
				<lineStyle kind="GRID" colorName="black"/>
			</blockTableStyle>
			<tr>
				<td>Symbol Name</td>
				<td>Displays</td>
			</tr>
			<tr>
				<td>Copyright</td>
				<td>&#169;</td>
			</tr>
			<tr>
				<td>Registered</td>
				<td>&#174;</td>
			</tr>
			<tr>
				<td>Trademark</td>
				<td>&#x2122;</td>
			</tr>
		</blockTable>

		<para style="normal">Test 31 does Unicode with Japanese characters, but you'll need the Adobe font pack to read that one.</para>

		<para style="normal">This uses the unichar tag to render an umlaut:<unichar name='LATIN SMALL LETTER U WITH DIAERESIS'/></para>
		


	</story>
</document>
