3 # create ltj-unicode-ccfix.tex by processing Unicode data file
6 # modified from unicode-char-prep.pl (part of the XeTeX typesetting system).
7 # original copyright is as follows:
9 # /****************************************************************************\
10 # Part of the XeTeX typesetting system
11 # Copyright (c) 1994-2008 by SIL International
12 # Copyright (c) 2009 by Jonathan Kew
14 # SIL Author(s): Jonathan Kew
16 # Permission is hereby granted, free of charge, to any person obtaining
17 # a copy of this software and associated documentation files (the
18 # "Software"), to deal in the Software without restriction, including
19 # without limitation the rights to use, copy, modify, merge, publish,
20 # distribute, sublicense, and/or sell copies of the Software, and to
21 # permit persons to whom the Software is furnished to do so, subject to
22 # the following conditions:
24 # The above copyright notice and this permission notice shall be
25 # included in all copies or substantial portions of the Software.
27 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30 # NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE
31 # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
32 # CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
33 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 # Except as contained in this notice, the name of the copyright holders
36 # shall not be used in advertising or otherwise to promote the sale,
37 # use or other dealings in this Software without prior written
38 # authorization from the copyright holders.
39 # \****************************************************************************/
41 die "usage: perl $0 LineBreak.txt > unicode-letters.tex\n"
46 $lccode{$u[0]} = $u[13] if $u[13] ne '';
47 $lccode{$u[0]} = $u[0] if $u[13] eq '' and ($u[2] =~ /^L/ or $u[12] ne '');
48 $uccode{$u[0]} = $u[12] if $u[12] ne '';
49 $uccode{$u[0]} = $u[0] if $u[12] eq '' and ($u[2] =~ /^L/ or $u[13] ne '');
51 push(@letters, $u[0]);
53 elsif ($u[2] =~ /^M/) {
56 elsif (exists $lccode{$u[0]} or exists $uccode{$u[0]}) {
57 push(@casesym, $u[0]);
66 -- Do not edit this file!
67 -- Created from LineBreak.txt by ltj-unicode-ccfix_make.pl on $date.
68 -- In case of errors, fix the Perl script instead.
72 'ID' => 1, # ideograph
77 if tex.getcatcode(0x6F22)==12 then
78 local tex_catcode = tex.setcatcode
79 local function set_letter(b,e)
80 for i=b,e do tex_catcode('global', i, 11) end
85 open LineBreak, $ARGV[0] or die "can't read $ARGV[0]";
90 if (m/([0-9A-F]{4,6})(?:\.\.([0-9A-F]{4,6}))?;(..)/) {
95 if (exists $lineBreakClass{$lb}) {
96 if ($lineBreakClass{$lb} == 1) {
97 # ideographs: set whole range to class 1
98 print " set_letter(0x$s,0x$e)\n";