2 Copyright (c) 2001-2003 International Business Machines
3 Corporation and others. All Rights Reserved.
6 <!DOCTYPE html PUBLIC
"-//w3c//dtd html 4.0 transitional//en">
9 <meta http-equiv=
"Content-Type"
10 content=
"text/html; charset=iso-8859-1">
11 <meta name=
"Author" content=
"Eric Mader">
12 <meta name=
"GENERATOR"
13 content=
"Mozilla/4.72 [en] (Windows NT 5.0; U) [Netscape]">
14 <title>Readme file for the ICU LayoutEngine demo
</title>
17 <h2> What is the layout demo?
</h2>
18 The layout demo displays a paragraph of text that is laid out using the
19 LayoutEngine. There are two versions of this demo, "layout.exe" which
20 runs on Windows
2000, and "gnomelayout" which runs on Linux. Both
21 programs read a file containing the Unicode text to display, and a file
22 that says which font to use to display each script.
<br>
24 <h2> How do I build the layout demo?
</h2>
25 First, you need to build ICU, including the LayoutEngine.
26 <p>On Windows, the layout project should be listed as a dependency of
27 all, so layout will build when you build all. If it doesn't for some
28 reason, just select the layout project in the project toolbar and build
30 <p>On Linux systems, you need to add the "--enable-layout=yes" option
31 when you invoke the runConfigureICU script. When you've done that,
32 layout should build when you do "make all install"
</p>
33 <p>To build the demo on Windows, just open the layout project in
34 <icu
>\source\samples\layout and build it.
</p>
35 <p>On Linux systems, connect to
<top-build-dir
>/samples/layout
36 and do "make all"
To build the layout demo on Linux, you'll need
37 the gnome-libs-devel and freetype-devel packages, which should be part
38 of your Linux distribution. The demo uses the FreeType
1 library, and
39 the make files assume that the FreeType header files are in
40 /usr/include/freetype1, and that the freetype library is
41 /usr/lib/libttf.so. This is how RedHat Linux
7.2 installs FreeType
1. If
42 your system is different, you may need to add sym links to where the
43 files are stored on your system, or
modify
44 <top-src-dir
>/samples/layout/Makefile.in to reference the files
45 correctly for your system.
<br>
47 <h2> How do I run the demo?
</h2>
48 Before you can run the demo, you'll need to get the fonts it uses. For
49 legal reasons, we can't include these fonts with ICU, but you can
50 download them from the web. To do this, you'll need access to a
51 computer running Windows. Here's how to get the fonts:
52 <p>Download the
1.3 version of the JDK from the
<a
53 href=
"http://www.ibm.com/java"> IBM developerWorks Java technology zone
</a>
54 page. From this page, follow the "Tools and products" link on the left
55 hand side, and then the link for the "IBM Developer Kit for Linux", or
56 the "IBM Developer Kit for Windows(R), Release
1.3.0". You'll need to
57 register with them if you haven't downloaded before. Download and
58 install the "Runtime Environment Package." You'll need one font from
59 this package. If you've let the installer use it's defaults, the fonts
60 will be in C:\Program Files\IBM\Java13\jre\lib\fonts. The file you want
61 is "Thonburi.ttf" On Windows, copy this font file to your Fonts folder,
62 on Linux, copy this font file to the directory from which you'll run
64 <p>Next is the Hindi font. Go to the
NCST site and download
<a
65 href=
"http://rohini.ncst.ernet.in/indix/download/font/raghu.ttf">
66 raghu.ttf
</a>. Be sure to look at the
<a
67 href=
"http://rohini.ncst.ernet.in/indix/download/font/README"> README
</a>
68 file before you download the font. On Linux, you can download raghu.ttf
69 into the directory from which you'll run the layout demo. On Windows,
70 you'll need to install it in your Fonts folder.
</p>
71 <p>There's still one more font to get, the Code2000 Unicode font.Go to
72 James Kass'
<a href=
"http://home.att.net/%7Ejameskass/">Unicode
73 Support In Your Browser
</a> page and click on the link that says "Click
74 Here to download Code2000 shareware demo Unicode font." This will
75 download a .ZIP file which contains CODE2000.TTF and CODE2000.HTM.
76 Expand this .ZIP file. If you're going to run the layout demo on Linux,
77 put the CODE2000.TTF file in the directory from which you'll run the
78 demo. On Windows, copy the font to your fonts folder.
</p>
79 <p><span style=
"font-weight: bold;">Note:
</span> The Code2000 font is
80 shareware. If you want to use it for longer than a trial period, you
81 should send a shareware fee to James. Directions for how to do this are
83 <p>That's it! Now all you have to do is run letest (CTRL+F5 in Visual
84 C++, or "./gnomelayout" in Linux)
</p>
85 <h2> How can I customize the layout demo?
</h2>
86 The text that the layout demo displays is read from the file
87 "Sample.txt." You can change the text by editing this file using a
88 Unicode-aware text editor. (it is in UTF8 format with a BOM as the first
89 character; the demo can also read UTF16 and UTF32 format files)
90 Remember that the text will be displayed in a single paragraph; you can
91 include CR and LF characters in the text, but they will be ignored.
92 <p>If you add scripts to the text other than Arabic, Devanagari, Latin
93 or Thai, you'll need to find a font which contains the characters in
94 that script, and add an entry to the FontMap file ("FontMap.GDI" on
95 Windows, "FontMap.Gnome" on Linux) This file contains a single entry per
96 line. Each entry contains a script name followed by a colon, and then a
98 <p>Here is the list of legal script names:
</p>
99 <blockquote><tt>ARABIC
</tt> <br>
100 <tt>ARMENIAN
</tt> <br>
101 <tt>BENGALI
</tt> <br>
102 <tt>BOPOMOFO
</tt> <br>
103 <span style=
"font-family: monospace;">BUHID
</span><br>
104 <tt>CANADIAN_ABORIGINAL
</tt> <br>
105 <tt>CHEROKEE
</tt> <br>
106 <tt>CYRILLIC
</tt> <br>
107 <tt>DESERET
</tt> <br>
108 <tt>DEVANAGARI
</tt> <br>
109 <tt>ETHIOPIC
</tt> <br>
110 <tt>GEORGIAN
</tt> <br>
113 <tt>GUJARATI
</tt> <br>
114 <tt>GURMUKHI
</tt> <br>
117 <span style=
"font-family: monospace;">HANUNOO
</span><br>
119 <tt>HIRAGANA
</tt> <br>
120 <span style=
"font-family: monospace;"></span><tt>KANNADA
</tt> <br>
121 <tt>KATAKANA
</tt> <br>
124 <tt>MALAYALAM
</tt> <br>
125 <tt>MONGOLIAN
</tt> <br>
126 <tt>MYANMAR
</tt> <br>
128 <tt>OLD_ITALIC
</tt> <br>
131 <tt>SINHALA
</tt> <br>
133 <span style=
"font-family: monospace;">TAGALOG
<br>
139 <tt>TIBETAN
</tt> <br>
142 You can also use the script name "DEFAULT" to represent all scripts
143 which you don't explicitly list in the FontMap file.
<br>
145 On Windows use the full name of the font as it appears in the Windows
146 Fonts folder (eg. "Times New Roman") On Linux, use the file name of the
147 font file (e.g. "Times.TTF") If you're running on Windows, you'll need
148 to install the new fonts in your Fonts folder. If you're running on
149 Linux, put them in the directory from which you'll run the demo.
<br>