#!/usr/bin/perl -w # # script to generate mapping between # Yudit internal ids and codepoints in # Tamil TSCII fonts (http://www.tscii.org) # Thuraiappah Vaseeharan # Mon Dec 31 20:13:51 CST 2001 print < 1, 0x201e => 1, 0x2025 => 1, 0x2020 => 1) ; @modifiers_0 = (0xa2, 0xa3) ; # i I #@modifiers_1 = (0xa4, 0xa5) ; # u U @modifiers_2 = (0xa6..0xa8) ; # e E ai @modifiers_3 = qw(o O au) ; # o O au %didI = ( 0xa2 => 0xca, 0xa3 => 0xcb) ; %first_part = ( 'o' => 0xa6, 'O' => 0xa7, 'au' => 0xa6 ) ; %last_part = ( 'o' => 0xa1 , 'O' => 0xa1 , 'au' => 0xaa ) ; # independent vowels, consonants print "COMM=begin tamil clusters\n" ; print "COMM=uyir, akara meys\n" ; $id = 0x80060000 ; foreach $v (@vowels) { printf("%x -> %04x\n", $id++, $v) ; } foreach $c (@consonants) { printf("%x -> %04x\n", $id++, $c) ; } $aravu = 0xa1 ; foreach $c (@consonants) { printf("%x -> %04x %04x\n", $id++, $c, $aravu) ; } print "COMM=meys\n" ; # meys (consonant + pulli) $id = 0x8006f000 ; @meys = (0xec..0xee, 0x2c6, 0xef..0xf3, 0xfd, 0xf4..0xf7, 0xfc, 0xf8, 0xfb, 0xfa, 0xf9, 0x2030, 0x0160, 0x2039) ; foreach $m (@meys) { printf("%x -> %04x\n", $id++, $m) ; } print "COMM=uyir-meys\n" ; # uyir-meys $id1 = 0x8006d000 ; $id2 = 0x8006e000 ; $count = 0 ; foreach $c (@consonants) { # i, I foreach $m (@modifiers_0) { if ($c == 0xbc) { printf("%x -> %04x\n", $id1++, $didI{$m}) ; } else { printf("%x -> %04x %04x\n", $id1++, $c, $m) ; } } # u if ($granthas{$c}) { printf("%x -> %04x %04x\n", $id1++, $c, $ukaram[$count]) ; } else { printf("%x -> %04x\n", $id1++, $ukaram[$count]) ; } # U if ($granthas{$c}) { printf("%x -> %04x %04x\n", $id1++, $c, $Ukaaram[$count]) ; } else { printf("%x -> %04x\n", $id1++, $Ukaaram[$count]) ; } # e, E, ai foreach $m (@modifiers_2) { printf("%x -> %04x %04x\n", $id2++, $m, $c) ; } # o, O, au foreach $m (@modifiers_3) { printf("%x -> %04x %04x %04x\n", $id2++, $first_part{$m}, $c, $last_part{$m}) ; } $count++ ; } print "COMM=end tamil\n" ;