]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/samples/layout/readme.html
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / samples / layout / readme.html
... / ...
CommitLineData
1<!--
2Copyright (c) 2001-2003 International Business Machines
3Corporation and others. All Rights Reserved.
4-->
5
6<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
7<html>
8<head>
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>
15</head>
16<body>
17<h2> What is the layout demo?</h2>
18The layout demo displays a paragraph of text that is laid out using the
19LayoutEngine. There are two versions of this demo, "layout.exe" which
20runs on Windows 2000, and "gnomelayout" which runs on Linux. Both
21programs read a file containing the Unicode text to display, and a file
22that says which font to use to display each script. <br>
23&nbsp;
24<h2> How do I build the layout demo?</h2>
25First, you need to build ICU, including the LayoutEngine.
26<p>On Windows, the layout project should be listed as a dependency of
27all, so layout will build when you build all. If it doesn't for some
28reason, just select the layout project in the project toolbar and build
29it. </p>
30<p>On Linux systems, you need to add the "--enable-layout=yes" option
31when you invoke the runConfigureICU script. When you've done that,
32layout should build when you do "make all install" </p>
33<p>To build the demo on Windows, just open the layout project in
34&lt;icu&gt;\source\samples\layout and build it.</p>
35<p>On Linux systems, connect to &lt;top-build-dir&gt;/samples/layout
36and do "make all" &nbsp;To build the layout demo on Linux, you'll need
37the gnome-libs-devel and freetype-devel packages, which should be part
38of your Linux distribution. The demo uses the FreeType 1 library, and
39the 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
42your system is different, you may need to add sym links to where the
43files are stored on your system, or&nbsp; modify
44&lt;top-src-dir&gt;/samples/layout/Makefile.in to reference the files
45correctly for your system.<br>
46&nbsp; </p>
47<h2> How do I run the demo?</h2>
48Before you can run the demo, you'll need to get the fonts it uses. For
49legal reasons, we can't include these fonts with ICU, but you can
50download them from the web. To do this, you'll need access to a
51computer 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>
54page. From this page, follow the "Tools and products" link on the left
55hand side, and then the link for the "IBM Developer Kit for Linux", or
56the "IBM Developer Kit for Windows(R), Release 1.3.0". You'll need to
57register with them if you haven't downloaded before. Download and
58install the "Runtime Environment Package." You'll need one font from
59this package. If you've let the installer use it's defaults, the fonts
60will be in C:\Program Files\IBM\Java13\jre\lib\fonts. The file you want
61is "Thonburi.ttf" On Windows, copy this font file to your Fonts folder,
62on Linux, copy this font file to the directory from which you'll run
63the layout demo.</p>
64<p>Next is the Hindi font. Go to the&nbsp; NCST site and download&nbsp;<a
65 href="http://rohini.ncst.ernet.in/indix/download/font/raghu.ttf">
66raghu.ttf</a>. Be sure to look at the&nbsp;<a
67 href="http://rohini.ncst.ernet.in/indix/download/font/README"> README</a>
68file before you download the font. On Linux, you can download raghu.ttf
69into the directory from which you'll run the layout demo. On Windows,
70you'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
72James Kass' &nbsp;<a href="http://home.att.net/%7Ejameskass/">Unicode
73Support In Your Browser</a> page and click on the link that says "Click
74Here to download Code2000 shareware demo Unicode font." This will
75download a .ZIP file which contains CODE2000.TTF and CODE2000.HTM.
76Expand this .ZIP file. If you're going to run the layout demo on Linux,
77put the CODE2000.TTF file in the directory from which you'll run the
78demo. On Windows, copy the font to your fonts folder.</p>
79<p><span style="font-weight: bold;">Note:</span> The Code2000 font is
80shareware. If you want to use it for longer than a trial period, you
81should send a shareware fee to James. Directions for how to do this are
82in CODE2000.HTM.</p>
83<p>That's it! Now all you have to do is run letest (CTRL+F5 in Visual
84C++, or "./gnomelayout" in Linux) </p>
85<h2> How can I customize the layout demo?</h2>
86The 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
88Unicode-aware text editor. (it is in UTF8 format with a BOM as the first
89character; the demo can also read UTF16 and UTF32 format files)
90Remember that the text will be displayed in a single paragraph; you can
91include 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
93or Thai, you'll need to find a font which contains the characters in
94that script, and add an entry to the FontMap file ("FontMap.GDI" on
95Windows, "FontMap.Gnome" on Linux) This file contains a single entry per
96line. Each entry contains a script name followed by a colon, and then a
97font name. </p>
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>
111 <tt>GOTHIC</tt> <br>
112 <tt>GREEK</tt> <br>
113 <tt>GUJARATI</tt> <br>
114 <tt>GURMUKHI</tt> <br>
115 <tt>HAN</tt> <br>
116 <tt>HANGUL</tt> <br>
117 <span style="font-family: monospace;">HANUNOO</span><br>
118 <tt>HEBREW</tt> <br>
119 <tt>HIRAGANA</tt> <br>
120 <span style="font-family: monospace;"></span><tt>KANNADA</tt> <br>
121 <tt>KATAKANA</tt> <br>
122 <tt>KHMER</tt> <br>
123 <tt>LATIN</tt> <br>
124 <tt>MALAYALAM</tt> <br>
125 <tt>MONGOLIAN</tt> <br>
126 <tt>MYANMAR</tt> <br>
127 <tt>OGHAM</tt> <br>
128 <tt>OLD_ITALIC</tt> <br>
129 <tt>ORIYA</tt> <br>
130 <tt>RUNIC</tt> <br>
131 <tt>SINHALA</tt> <br>
132 <tt>SYRIAC</tt> <br>
133 <span style="font-family: monospace;">TAGALOG<br>
134TAGBANWA</span><br>
135 <tt>TAMIL</tt> <br>
136 <tt>TELUGU</tt> <br>
137 <tt>THAANA</tt> <br>
138 <tt>THAI</tt> <br>
139 <tt>TIBETAN</tt> <br>
140 <tt>YI<br>
141 </tt></blockquote>
142You can also use the script name "DEFAULT" to represent all scripts
143which you don't explicitly list in the FontMap file.<br>
144<br>
145On Windows use the full name of the font as it appears in the Windows
146Fonts folder (eg. "Times New Roman") On Linux, use the file name of the
147font file (e.g. "Times.TTF") If you're running on Windows, you'll need
148to install the new fonts in your Fonts folder. If you're running on
149Linux, put them in the directory from which you'll run the demo. <br>
150&nbsp; <br>
151&nbsp;
152</body>
153</html>