1ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
4ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru<html>
5ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru<head>
6ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
7ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <meta name="COPYRIGHT" content=
827f654740f2a26ad62a5c155af9199af9e69b889claireho  "Copyright (c) 2001-2010 IBM Corporation and others. All Rights Reserved." />
9ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <meta name="Author" content="Eric Mader" />
10ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
11ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <title>Readme file for the ICU LayoutEngine demo</title>
12ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru</head>
13ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
14ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru<body>
15ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <h2>What is the layout demo?</h2>
16ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
17ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>The layout demo displays a paragraph of text that is laid out using the
18ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  LayoutEngine. There are two versions of this demo, "layout.exe" which runs on
19ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  Windows 2000, and "gnomelayout" which runs on Linux. Both programs read a
20ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  file containing the Unicode text to display, and a file that says which font
21ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  to use to display each script.</p>
22ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
23ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <h2>How do I build the layout demo?</h2>First, you need to build ICU,
24ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  including the LayoutEngine.
25ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
26ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>On Windows, the layout project should be listed as a dependency of all, so
27ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  layout will build when you build all. If it doesn't for some reason, just
28ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  select the layout project in the project toolbar and build it.</p>
29ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
30ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>On Linux systems, you need to add the "--enable-layout=yes" option when
31ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  you invoke the runConfigureICU script. When you've done that, layout should
32ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  build when you do "make all install"</p>
33ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
34ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>To build the demo on Windows, just open the layout project in
35ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  &lt;icu&gt;\source\samples\layout and build it.</p>
36ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
37ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>On Linux systems, connect to &lt;top-build-dir&gt;/samples/layout and do
38ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  "make all". To build the layout demo on Linux, you'll need the
39ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  gnome-libs-devel and freetype-devel packages, which should be part of your
40ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  Linux distribution. The demo uses the FreeType 1 library, and the make files
41ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  assume that the FreeType header files are in /usr/include/freetype1, and that
42ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  the freetype library is /usr/lib/libttf.so. This is how RedHat Linux 7.2
43ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  installs FreeType 1. If your system is different, you may need to add sym
44ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  links to where the files are stored on your system, or modify
45ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  &lt;top-src-dir&gt;/samples/layout/Makefile.in to reference the files
46ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  correctly for your system.</p>
47ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
48ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <h2>How do I run the demo?</h2>
49ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
50ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>Before you can run the demo, you'll need to get the fonts it uses. For
51ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  legal reasons, we can't include these fonts with ICU, but you can download
52ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  them from the web. To do this, you'll need access to a computer running
53ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  Windows. Here's how to get the fonts:</p>
54ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
55ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>First, download the Thai font. Go to <a href=
5627f654740f2a26ad62a5c155af9199af9e69b889claireho  "http://www.freelang.net/fonts/index.php">freelang.net</a> and
5727f654740f2a26ad62a5c155af9199af9e69b889claireho  click on the link for the Courier Thai font. This will download a .ZIP file.
5827f654740f2a26ad62a5c155af9199af9e69b889claireho  Extract the Courpro.ttf font. On Windows, copy this font file to your
5927f654740f2a26ad62a5c155af9199af9e69b889claireho  Fonts folder (note the name of the font after it is installed), on Linux, copy this font file to the directory from which
60ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  you'll run the layout demo.</p>
61ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
6227f654740f2a26ad62a5c155af9199af9e69b889claireho  <p>Next is the Hindi font. Download the font from <a href=
6327f654740f2a26ad62a5c155af9199af9e69b889claireho  "http://www.ffonts.net/Raghindi.font.download">Raghindi</a>. On Linux, you can download the font into the
64ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  directory from which you'll run the layout demo. On Windows, you'll need to
65ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  install it in your Fonts folder.</p>
66ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
67ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>There's still one more font to get, the Code2000 Unicode font. Go to James
68ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  Kass' <a href="http://www.code2000.net/">Unicode Support In Your
69ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  Browser</a> page and click on the link that says "Click Here to download
70ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  Code2000 shareware demo Unicode font." This will download a .ZIP file which
71ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  contains CODE2000.TTF and CODE2000.HTM. Expand this .ZIP file. If you're
72ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  going to run the layout demo on Linux, put the CODE2000.TTF file in the
73ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  directory from which you'll run the demo. On Windows, copy the font to your
74ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  fonts folder.</p>
75ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
76ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p><strong>Note:</strong> The Code2000 font is shareware. If you want to use
77ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  it for longer than a trial period, you should send a shareware fee to James.
78ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  Directions for how to do this are in CODE2000.HTM.</p>
79ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
8027f654740f2a26ad62a5c155af9199af9e69b889claireho  <p>Be sure that your FontMap.GDI (on Windows) or FontMap.Gnome file (on Linux) contains accurate
8127f654740f2a26ad62a5c155af9199af9e69b889claireho  font names for each script type.  For example, the following is a valid FontMap.GDI (assuming you have the correct fonts):
8227f654740f2a26ad62a5c155af9199af9e69b889claireho  <br><br>DEVANAGARI: Raghindi<br>THAI: Courier MonoThai<br>DEFAULT: Code2000<br><br>Note that only the Code2000 default font is strictly necessary,
8327f654740f2a26ad62a5c155af9199af9e69b889claireho  and that the other two can simply be commented out by a '#' if you do not wish to use them.</p>
8427f654740f2a26ad62a5c155af9199af9e69b889claireho
8527f654740f2a26ad62a5c155af9199af9e69b889claireho  <p>Also note that the FontMap and the sample.txt files have to be in the same directory as the layout executable.</p>
8627f654740f2a26ad62a5c155af9199af9e69b889claireho
87ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>That's it! Now all you have to do is run letest (CTRL+F5 in Visual C++, or
88ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  "/gnomelayout" in Linux)</p>
89ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
90ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <h2>How can I customize the layout demo?</h2>
91ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
92ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>The text that the layout demo displays is read from the file "Sample.txt."
93ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  You can change the text by editing this file using a Unicode-aware text
94ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  editor. (it is in UTF8 format with a BOM as the first character; the demo can
95ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  also read UTF16 and UTF32 format files) Remember that the text will be
96ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  displayed in a single paragraph; you can include CR and LF characters in the
97ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  text, but they will be ignored.</p>
98ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
99ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>If you add scripts to the text other than Arabic, Devanagari, Latin or
100ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  Thai, you'll need to find a font which contains the characters in that
101ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  script, and add an entry to the FontMap file ("FontMap.GDI" on Windows,
102ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  "FontMap.Gnome" on Linux) This file contains a single entry per line. Each
103ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  entry contains a script name followed by a colon, and then a font name.</p>
104ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
105ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>Here is the list of legal script names:</p>
106ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
107ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <blockquote>
108ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>ARABIC</tt><br />
109ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>ARMENIAN</tt><br />
110ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>BENGALI</tt><br />
111ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>BOPOMOFO</tt><br />
112ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <span style="font-family: monospace;">BUHID</span><br />
113ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>CANADIAN_ABORIGINAL</tt><br />
114ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>CHEROKEE</tt><br />
115ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>CYRILLIC</tt><br />
116ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>DESERET</tt><br />
117ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>DEVANAGARI</tt><br />
118ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>ETHIOPIC</tt><br />
119ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>GEORGIAN</tt><br />
120ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>GOTHIC</tt><br />
121ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>GREEK</tt><br />
122ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>GUJARATI</tt><br />
123ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>GURMUKHI</tt><br />
124ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>HAN</tt><br />
125ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>HANGUL</tt><br />
126ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <span style="font-family: monospace;">HANUNOO</span><br />
127ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>HEBREW</tt><br />
128ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>HIRAGANA</tt><br />
129ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>KANNADA</tt><br />
130ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>KATAKANA</tt><br />
131ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>KHMER</tt><br />
132ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>LATIN</tt><br />
133ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>MALAYALAM</tt><br />
134ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>MONGOLIAN</tt><br />
135ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>MYANMAR</tt><br />
136ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>OGHAM</tt><br />
137ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>OLD_ITALIC</tt><br />
138ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>ORIYA</tt><br />
139ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>RUNIC</tt><br />
140ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>SINHALA</tt><br />
141ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>SYRIAC</tt><br />
142ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <span style="font-family: monospace;">TAGALOG<br />
143ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    TAGBANWA</span><br />
144ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>TAMIL</tt><br />
145ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>TELUGU</tt><br />
146ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>THAANA</tt><br />
147ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>THAI</tt><br />
148ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>TIBETAN</tt><br />
149ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    <tt>YI<br /></tt>
150ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  </blockquote>
151ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
152ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>You can also use the script name "DEFAULT" to represent all scripts which
153ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  you don't explicitly list in the FontMap file.</p>
154ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
155ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  <p>On Windows use the full name of the font as it appears in the Windows
156ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  Fonts folder (eg. "Times New Roman") On Linux, use the file name of the font
157ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  file (e.g. "Times.TTF") If you're running on Windows, you'll need to install
158ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  the new fonts in your Fonts folder. If you're running on Linux, put them in
159ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  the directory from which you'll run the demo.</p><br />
160ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru</body>
161ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru</html>
162