• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

Makefile.inD23-Nov-20231.9 KiB8853

readme.htmlD23-Nov-20233.5 KiB7064

scrptrun.cppD23-Nov-20235.3 KiB207137

scrptrun.hD23-Nov-20233.2 KiB16093

sources.txtD23-Nov-202324 32

srtest.cppD23-Nov-20231.2 KiB4326

srtest.dspD23-Nov-20234.3 KiB11194

srtest.dswD23-Nov-2023506 3019

readme.html

1<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2<html>
3<head>
4   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5   <meta name="Copyright" content="Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html">
6   <!-- meta name="Copyright" content="Copyright (c) 2002, International Business Machines Corporation and others. All Rights Reserved." -->
7   <meta name="Author" content="Eric Mader">
8   <meta name="GENERATOR" content="Mozilla/4.72 [en] (Windows NT 5.0; U) [Netscape]">
9   <title>ScriptRun readme</title>
10</head>
11<body>
12
13<h2>
14What is scrptrun and srtest?</h2>
15The ICU LayoutEngine must be called with text in a single script. scrptrun.h
16and scrptrun.cpp implement the ScriptRun class, which can be used to find
17runs of text that is in a single script. It uses a basic iteration interface.
18<p>srtest is a little program that tests ScriptRun. You can use it as an
19example of how to use ScriptRun. Here's what the output should look like:
20<blockquote><font face="Courier New,Courier"><font size=-1>Script 'DEVANAGARI'
21from 0 to 9.</font></font>
22<br><font face="Courier New,Courier"><font size=-1>Script 'ARABIC' from
239 to 17.</font></font>
24<br><font face="Courier New,Courier"><font size=-1>Script 'CYRILLIC' from
2517 to 25.</font></font>
26<br><font face="Courier New,Courier"><font size=-1>Script 'LATIN' from
2725 to 33.</font></font>
28<br><font face="Courier New,Courier"><font size=-1>Script 'HAN' from 33
29to 35.</font></font>
30<br><font face="Courier New,Courier"><font size=-1>Script 'HIRAGANA' from
3135 to 41.</font></font>
32<br><font face="Courier New,Courier"><font size=-1>Script 'KATAKANA' from
3341 to 45.</font></font>
34<br><font face="Courier New,Courier"><font size=-1>Script 'DESERET' from
3545 to 53.</font></font></blockquote>
36
37<h2>
38How do I build scrptrun and srtest?</h2>
39To use the ScriptRun class in a Windows application, just include scrptrun.h
40and scrptrun.cpp right out of the &lt;icu>\source\extra\scrptrun directory
41into your project. You'll also need to add the &lt;icu>\source]extra\scrptrun
42directory to the "Additional include directories" section of the "Preprocessor"
43category on the "C/C++" tab in the project settings.
44<p>On UNIX systems the simplest thing to do is to just copy scrptrun.h
45and scrptrun.cpp into your source directory. If you want to use them from
46&lt;icu>/source/extra/scrpturn, it's a bit trickier: the default dependency
47rules don't work on source files in a different directory. You need to
48add separate dependency rules for scrptrun.o and scrptrun.d. See &lt;icu>/source/samples/layout/Makefile.in
49for an example of how to do this. You'll also have to add -I$(top_srcdir)/extra/scrptrun
50to your compiler flags so that the compiler can find scrptrun.h. If your
51application has to build on multiple UNIX platforms, it might be difficult
52to wirte dependency rules that will work correctly on all platforms. In
53that case, you're probably better off copying the scrpturn files to your
54source directory.
55<p>Building srtest is easy, on Windows build the srtest workspace in &lt;icu>\source\extra\scrptrun.
56On UNIX, connect to &lt;top-build-dir>/extra/scrptrun and do "make all"
57<h2>
58Notes</h2>
59
60<ul>
61<li>
62ScriptRun is based on <a href="http://www.unicode.org/unicode/reports/tr24/">Unicode
63Technical Report #24</a> but the implementation is not complete. In particular
64the support for paired punctuation is only a prototype. A complete implementation
65will be added to ICU in the future.</li>
66</ul>
67
68</body>
69</html>
70