]> git.saurik.com Git - apple/icu.git/blob - icuSources/samples/layout/readme.html
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / samples / layout / readme.html
1 <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4 <!--
5 Copyright (c) 2001-2005 International Business Machines
6 Corporation and others. All Rights Reserved.
7 -->
8 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
9 <meta name="Author" content="Eric Mader">
10 <meta name="GENERATOR" content="Mozilla/4.72 [en] (Windows NT 5.0; U) [Netscape]">
11 <title>Readme file for the ICU LayoutEngine demo</title>
12 </head>
13 <body>
14 <h2>
15 What is the layout demo?</h2>
16 The layout demo displays a paragraph of text that is laid out using the
17 LayoutEngine. There are two versions of this demo, "layout.exe" which runs on
18 Windows 2000, and "gnomelayout" which runs on Linux. Both programs read a file
19 containing the Unicode text to display, and a file that says which font to use
20 to display each script.
21 <br>
22 &nbsp;
23 <h2>
24 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 all, so
27 layout will build when you build all. If it doesn't for some reason, just
28 select the layout project in the project toolbar and build it.
29 </p>
30 <p>On Linux systems, you need to add the "--enable-layout=yes" option when you
31 invoke the runConfigureICU script. When you've done that, layout should build
32 when you do "make all install"
33 </p>
34 <p>To build the demo on Windows, just open the layout project in
35 &lt;icu&gt;\source\samples\layout and build it.</p>
36 <p>On Linux systems, connect to &lt;top-build-dir&gt;/samples/layout and do "make
37 all" &nbsp;To build the layout demo on Linux, you'll need the gnome-libs-devel
38 and freetype-devel packages, which should be part of your Linux distribution.
39 The demo uses the FreeType 1 library, and the make files assume that the
40 FreeType header files are in /usr/include/freetype1, and that the freetype
41 library is /usr/lib/libttf.so. This is how RedHat Linux 7.2 installs FreeType
42 1. If your system is different, you may need to add sym links to where the
43 files are stored on your system, or&nbsp; modify
44 &lt;top-src-dir&gt;/samples/layout/Makefile.in to reference the files correctly
45 for your system.<br>
46 &nbsp;
47 </p>
48 <h2>
49 How do I run the demo?</h2>
50 Before you can run the demo, you'll need to get the fonts it uses. For legal
51 reasons, we can't include these fonts with ICU, but you can download them from
52 the web. To do this, you'll need access to a computer running Windows. Here's
53 how to get the fonts:
54 <p>First, download the Thai font. Go to <a href="http://www.into-asia.com/thai_language/thaifont/">
55 into-asia.com</a> and click on the link for the Angsana font. This will
56 download a .ZIP file. Extract the font file, angsd___.ttf On Windows, copy this
57 font file to your Fonts folder, on Linux, copy this font file to the directory
58 from which you'll run the layout demo.</p>
59 <p>Next is the Hindi font. Go to the&nbsp; NCST site and download&nbsp;<a href="http://rohini.ncst.ernet.in/indix/download/font/raghu.ttf">
60 raghu.ttf</a>. Be sure to look at the&nbsp;<a href="http://rohini.ncst.ernet.in/indix/download/font/README">
61 README</a> file before you download the font. On Linux, you can download
62 raghu.ttf into the directory from which you'll run the layout demo. On Windows,
63 you'll need to install it in your Fonts folder.</p>
64 <p>There's still one more font to get, the Code2000 Unicode font.Go to James Kass'
65 &nbsp;<a href="http://home.att.net/%7Ejameskass/">Unicode Support In Your Browser</a>
66 page and click on the link that says "Click Here to download Code2000 shareware
67 demo Unicode font." This will download a .ZIP file which contains CODE2000.TTF
68 and CODE2000.HTM. Expand this .ZIP file. If you're going to run the layout demo
69 on Linux, put the CODE2000.TTF file in the directory from which you'll run the
70 demo. On Windows, copy the font to your fonts folder.</p>
71 <p><span style="font-weight: bold;">Note:</span>
72 The Code2000 font is shareware. If you want to use it for longer than a trial
73 period, you should send a shareware fee to James. Directions for how to do this
74 are in CODE2000.HTM.</p>
75 <p>That's it! Now all you have to do is run letest (CTRL+F5 in Visual C++, or
76 "./gnomelayout" in Linux)
77 </p>
78 <h2>
79 How can I customize the layout demo?</h2>
80 The text that the layout demo displays is read from the file "Sample.txt." You
81 can change the text by editing this file using a Unicode-aware text editor. (it
82 is in UTF8 format with a BOM as the first character; the demo can also read
83 UTF16 and UTF32 format files) Remember that the text will be displayed in a
84 single paragraph; you can include CR and LF characters in the text, but they
85 will be ignored.
86 <p>If you add scripts to the text other than Arabic, Devanagari, Latin or Thai,
87 you'll need to find a font which contains the characters in that script, and
88 add an entry to the FontMap file ("FontMap.GDI" on Windows, "FontMap.Gnome" on
89 Linux) This file contains a single entry per line. Each entry contains a script
90 name followed by a colon, and then a font name.
91 </p>
92 <p>Here is the list of legal script names:
93 </p>
94 <blockquote><tt>ARABIC</tt>
95 <br>
96 <tt>ARMENIAN</tt>
97 <br>
98 <tt>BENGALI</tt>
99 <br>
100 <tt>BOPOMOFO</tt>
101 <br>
102 <span style="font-family: monospace;">BUHID</span><br>
103 <tt>CANADIAN_ABORIGINAL</tt>
104 <br>
105 <tt>CHEROKEE</tt>
106 <br>
107 <tt>CYRILLIC</tt>
108 <br>
109 <tt>DESERET</tt>
110 <br>
111 <tt>DEVANAGARI</tt>
112 <br>
113 <tt>ETHIOPIC</tt>
114 <br>
115 <tt>GEORGIAN</tt>
116 <br>
117 <tt>GOTHIC</tt>
118 <br>
119 <tt>GREEK</tt>
120 <br>
121 <tt>GUJARATI</tt>
122 <br>
123 <tt>GURMUKHI</tt>
124 <br>
125 <tt>HAN</tt>
126 <br>
127 <tt>HANGUL</tt>
128 <br>
129 <span style="font-family: monospace;">HANUNOO</span><br>
130 <tt>HEBREW</tt>
131 <br>
132 <tt>HIRAGANA</tt>
133 <br>
134 <span style="font-family: monospace;"></span><tt>KANNADA</tt>
135 <br>
136 <tt>KATAKANA</tt>
137 <br>
138 <tt>KHMER</tt>
139 <br>
140 <tt>LATIN</tt>
141 <br>
142 <tt>MALAYALAM</tt>
143 <br>
144 <tt>MONGOLIAN</tt>
145 <br>
146 <tt>MYANMAR</tt>
147 <br>
148 <tt>OGHAM</tt>
149 <br>
150 <tt>OLD_ITALIC</tt>
151 <br>
152 <tt>ORIYA</tt>
153 <br>
154 <tt>RUNIC</tt>
155 <br>
156 <tt>SINHALA</tt>
157 <br>
158 <tt>SYRIAC</tt>
159 <br>
160 <span style="font-family: monospace;">TAGALOG<br>
161 TAGBANWA</span><br>
162 <tt>TAMIL</tt>
163 <br>
164 <tt>TELUGU</tt>
165 <br>
166 <tt>THAANA</tt>
167 <br>
168 <tt>THAI</tt>
169 <br>
170 <tt>TIBETAN</tt>
171 <br>
172 <tt>YI<br>
173 </tt></blockquote>You can also use the script name "DEFAULT" to represent
174 all scripts which you don't explicitly list in the FontMap file.<br>
175 <br>
176 On Windows use the full name of the font as it appears in the Windows Fonts
177 folder (eg. "Times New Roman") On Linux, use the file name of the font file
178 (e.g. "Times.TTF") If you're running on Windows, you'll need to install the new
179 fonts in your Fonts folder. If you're running on Linux, put them in the
180 directory from which you'll run the demo.
181 <br>
182 &nbsp;
183 <br>
184 &nbsp;
185 </body>
186 </html>