From: mvishnu@bcr3.uwaterloo.ca (Meenan Vishnu)
Subject: Re: tamil scripts
Organization: University of Waterloo
Date: Wed, 27 Jan 1993 15:22:30 GMT

In article <5348@gos.ukc.ac.uk> rmv@ukc.ac.uk (raj) writes:
>I am interested in implementing the program which someone else (Kathiravan
>I think)  suggested. But as I drowned in the assessment given, I only intend
>to to a very simple version -- which is good enough for the need. I request
>your help. 
>     Can the netters take turn and "draw" the scripts in the following format.
>
>
>a[1] = "   o    " ,
>a[2] = "  __\\_|" ,
>a[3] = "  \\_/ |" ,
>a[4] = "        " ;
>
>
>ie letters should be fit between 8 columns & 4 rows.  a[1]  etc are arrays
>in C ( a programming language). Please stick to the format. It will save me a
>lot of time.
>          
>for  the next letter the format will be
>
>A[1] = "........" ,
>A[2] = "........" ,
>A[3] = "........" ,
>A[4] = "........" ;
>
> Note the  very last cahracter is a ";" unlike the previous lines which
>has a "," at the end.
>
>
>
>        I donot promise the completion. But a trial is better that nothing
>I suppose. It all depends on the assessment I get.
>
>           raj


 I suggested this in the net after seeing my Iranian officemate reading 
stuff in Persian (Arabic scripts).  I have already completed a few letters
and part of the program.  I will not be able to finish it soon as I am
quite busy with my academic work.  May be interested netters can share 
the work.  Dr. K. Srinivasan's front end (tam.c) is quite smart 
compared to the one I am intending to create.

My approach is as follows:

tam.h
---------------------------------------------------------------

typedef struct _script
  {
    int width;
    char map[5][10];
  }script;


tam.c
-----------------------------------------------------
#include <stdio.h>
#include "tam.h"

script ana = { 9,
             { {   o     },
               { ___\_|  },
               { \__/ |  },
               {         }}};
   
script avanna = { 9,
                  {   o     },
                  { ___\_|  },
                  { \__/ |. },
                  {     o_) }}};

script ina = { 10,
             { {   ____   },
               {  / o  \  },
               { _|__\_ | },
               { \_\_// | }}};

script eeyanna = { 8,
                 { { .____  },
                   { |o | o },
                   { |  |   },
                   {        }}};



script kana = { 8,
              { {       },
                { .___  },
                { |_|_  },
                {(_./_) },
                {       }}};

script thana = {8,
               { {       },
                 { .___  },
                 { |_|_  },
                 {(_./ ) },
                 {    /  }}};


script n_ana = {8,
               { {       },
                 { .___  },
                 { | |_  },
                 { |  _) },
                 {       }}};


script nana = {8,
              { {         }
                {  ______ },
                { / /\ |  },
                { O \/ |  },
                {         }}};


script Nana = {8,
              { {            }
                {  _________ },
                { / /\ /\ |  },
                { O \/ \/ |  },
                {            }}};
int print_line( script *letter, int line_number, int cur_pos )
  {
  } 


int main( int argc, char ** argv )
  {
  
    if( argc < 3 )
      {
        printf( "Usage: tam inputfile outputfile\n" );
        exit( -1 );
      }
    infile = fopen( argv[1], r );
    if( infile == NULL )
      {
        printf( "Unable to open input file '%s'\n", argv[1] );
        exit( -1 );
      }
    outfile = fopen( arg[2], w );
    if( outfile == NULL )
      {
        printf( "Unable to open output file '%s'\n", argv[2] );
        exit( -1 );
      }


  }
 
 

for example:

The lines

\t akara muthala ezuththellaam
   aathi pakavan
   muthaRkE ulaku \t

is converted to
--------------------------------------------------------------------------
                                                            O
 o.     ____  ____           ____    __   .     ____       ____   __   ____
___\_|  |_|_  | |   l | .^.  |_l_   /  \  |    /  |  | .^. |_|_  /  \  |_|_
\__/ | (__|_) | |   | |_|_| (__| )  O   \_/    O  |  |_|_|(__| ) O  | (__| )
               /     \__/       /                      |-.    /           /
                                                    \____|  
     O                     O
   __   .   __   . ____
  /  \  |  /  \  | | |  | .^.
  O   \_/  O   \_/ | |  |_|_| 
              _
             / \                            O
  o.      ___\  |         ____   __       ________
 ___\_|   |_|_  |   |  |  |_|_  |  |  |  /  / \  |
 \__/ |_ (__| ) |   |__| (__|_)  O |__|  O  \_/  |
      o_|    /       
                   O
         ____    _  _  /^O   ____    
 | | .^. |_|_   / \/ \ |    |_|_     O^\       __   ..  ____
 | |_|_|(__| )  \  ._/ |   (__|_)    __/      /  \  ||  |_|_
  \__/      /      |   \_O           |______  O   \_/| (__| ) 
                                                      \____/ 

----------------------------------------------------------------------------
Which is very much easier to read in SCT than the Roman letters.

Meenan Vishnu