Home | History | Annotate | only in /external/icu/icu4c/source/samples/layout
Up to higher level directory
NameDateSize
arraymem.h21-Aug-2018646
cgnomelayout.c21-Aug-20188.4K
clayout.c21-Aug-20189.8K
cmaps.cpp21-Aug-20185.3K
cmaps.h21-Aug-20182.1K
FontMap.cpp21-Aug-20187.3K
FontMap.GDI21-Aug-2018426
FontMap.Gnome21-Aug-2018392
FontMap.h21-Aug-20181.8K
FontTableCache.cpp21-Aug-20182.4K
FontTableCache.h21-Aug-20181.1K
GDIFontInstance.cpp21-Aug-20189.6K
GDIFontInstance.h21-Aug-20183.6K
GDIFontMap.cpp21-Aug-20181.3K
GDIFontMap.h21-Aug-20181.2K
gdiglue.cpp21-Aug-20181.7K
gdiglue.h21-Aug-2018983
GDIGUISupport.cpp21-Aug-2018862
GDIGUISupport.h21-Aug-2018949
GnomeFontInstance.cpp21-Aug-20185.4K
GnomeFontInstance.h21-Aug-20183.8K
GnomeFontMap.cpp21-Aug-20181.4K
GnomeFontMap.h21-Aug-20181.2K
gnomeglue.cpp21-Aug-20181.6K
gnomeglue.h21-Aug-2018986
GnomeGUISupport.cpp21-Aug-20181K
GnomeGUISupport.h21-Aug-2018961
gnomelayout.cpp21-Aug-20188.5K
gsupport.h21-Aug-2018370
GUISupport.h21-Aug-2018890
layout.cpp21-Aug-20189.8K
layout.sln21-Aug-20181.2K
layout.vcxproj21-Aug-201814.6K
layout.vcxproj.filters21-Aug-20183.1K
LayoutSample.rc21-Aug-20183.4K
Makefile.in21-Aug-20182.9K
paragraph.cpp21-Aug-20187.6K
paragraph.h21-Aug-20182.2K
pflow.c21-Aug-20189.3K
pflow.h21-Aug-2018940
readme.html21-Aug-20187.3K
RenderingSurface.h21-Aug-20181.1K
resource.h21-Aug-2018907
rsurface.cpp21-Aug-2018712
rsurface.h21-Aug-2018528
Sample.txt21-Aug-20181.7K
ScriptCompositeFontInstance.cpp21-Aug-20183.2K
ScriptCompositeFontInstance.h21-Aug-20186.2K
sfnt.h21-Aug-20184.9K
Surface.cpp21-Aug-2018892
Surface.h21-Aug-2018519
ucreader.cpp21-Aug-2018509
ucreader.h21-Aug-2018422
UnicodeReader.cpp21-Aug-20184.1K
UnicodeReader.h21-Aug-2018999

readme.html

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