From: Araki K. <j00...@ip...> - 2002-01-04 07:42:27
|
Hi, Subject: Re: mlterm ISCII support From: Jyotirmoy Saikia <jm...@cs...> Message-ID: <Pin...@cs...> Date: Fri, 4 Jan 2002 01:48:01 -0500 (EST) > Wish you both a very happy, bright and prosperous new year. Happy New Year ! > Now let me tell you some important characterstics of Indian languages. Thanks a lot! I don't still understand all about ISCII , which is very complicated and I began study only a few days ago... , but I know it more:) Then , I made an ISCII support patch for mlterm. It is still a prototype implementation(unstable!) , but I can see , edit in command line and copy&paste indian characters like iitm-term. Please test and give me comments. http://www.geocities.co.jp/SiliconValley-Cupertino/6461/mlterm-2.2.0-pre20020102-pre20020104.patch.gz http://www.geocities.co.jp/SiliconValley-Cupertino/6461/mlterm-2.2.0-pre20020104.tar.gz I prepared screen shots of mlterm and iitm-term , too. http://www.geocities.co.jp/SiliconValley-Cupertino/6461/mlterm.png http://www.geocities.co.jp/SiliconValley-Cupertino/6461/iitm-term.png mlterm depends on libind.tar.gz and truetype.tar.gz at http://www.tenet.res.in/Donlab/Indlinux/X-Windows/download.html , and xfstt. so please install and setup them in advance. # Please don't forget to install indian.h to where cc can find(e.g. /usr/local/include). If you don't use a tar archive but a gzipped patch , you have to cvs checkout cvs-current mlterm as follows. cvs -d :pserver:ano...@cv...:/cvsroot/mlterm login (hit Enter) cvs -d :pserver:ano...@cv...:/cvsroot/mlterm checkout mlterm after you get it , please do as follows. cd mlterm gunzip -c mlterm-2.2.0-pre20020102-pre20020104.patch.gz | patch -p1 ./configure --enable-ind make make install export LIBIND_PATH=/usr/local/libind mlterm -X=false -V -E iscii -w 16 -m -C Malayalam o -X=false is necessary if you use X Input Method(e.g. kinput2) which conflicts with xfstt.(recommended) o -V option enables variable column width.(must) o -m option enables character combining , which is necessary since mlterm diverts characters combining framework for rendering ISCII glyph internally.(must) o -C [lang] enables [lang] glyph. Without -C option , Malayalam is used by default. mlterm cannot change lang dynamically at present.(optional) o -w [font size] assigns font size you want to use.(optional) pressing Alt_R lets you use ISCII inputting. F1 key swithes Inscript <=> Phonetic keyboard(?). BTW , Jyotirmoy , are you involved in devevlopping libind ? I have some questions about it , so if I finishes implementing this , I'll send them to ind...@la... , but if you are a person concerned , I want to ask you now. Best Regards. -- kiken j00...@ip... |
From: Araki K. <j00...@ip...> - 2002-01-04 22:24:36
|
Hi, Subject: [Mlterm-dev-en] mlterm ISCII support patch (was: Re: mlterm ISCII support) From: Araki Ken <j00...@ip...> Message-ID: <200...@pd...> Date: Fri, 04 Jan 2002 16:37:20 +0900 > Then , I made an ISCII support patch for mlterm. > It is still a prototype implementation(unstable!) , but I can see , > edit in command line and copy&paste indian characters like iitm-term. > Please test and give me comments. > > http://www.geocities.co.jp/SiliconValley-Cupertino/6461/mlterm-2.2.0-pre20020102-pre20020104.patch.gz > http://www.geocities.co.jp/SiliconValley-Cupertino/6461/mlterm-2.2.0-pre20020104.tar.gz Attached patch is for bug fix of mlterm-2.2.0-pre20020104. 1. Roman lang ISCII (-C Roman) is not shown. fixed. 2. In some cases glyph rendering is corrupt. fixed. Regards. -- kiken j00...@ip... Index: src/ml_image_line.c =================================================================== RCS file: /home/ken/cvsroot/mlterm/src/ml_image_line.c,v retrieving revision 1.50 diff -u -r1.50 ml_image_line.c --- src/ml_image_line.c 2002/01/04 06:51:44 1.50 +++ src/ml_image_line.c 2002/01/04 22:05:58 @@ -1209,7 +1209,7 @@ ml_char_t * c ; ml_char_t * comb ; u_int comb_size ; - + if( prev_font_filled - font_filled > dst_pos) { font_filled = prev_font_filled - dst_pos ; @@ -1233,10 +1233,25 @@ comb_pos = 0 ; while( 1) { - ml_char_combine( &dst[dst_pos] , + if( ml_char_is_null( &dst[dst_pos])) + { + /* + * combining is forbidden if base character is null + */ + ml_char_copy( &dst[dst_pos] , c) ; + } + else if( ! ml_char_combine( &dst[dst_pos] , ml_char_bytes( c) , ml_char_size( c) , ml_char_font( c) , ml_char_font_decor( c) , - ml_char_fg_color( c) , ml_char_bg_color( c)) ; + ml_char_fg_color( c) , ml_char_bg_color( c))) + { + #ifdef DEBUG + kik_warn_printf( KIK_DEBUG_TAG + " combining failed.\n") ; + #endif + + break ; + } if( comb_pos >= comb_size) { @@ -1252,10 +1267,23 @@ if( dst_pos >= 0 && font_filled == prev_font_filled) { - ml_char_combine( &dst[dst_pos] , + if( ml_char_is_null( &dst[dst_pos])) + { + /* + * combining is forbidden if base character is null + */ + ml_char_copy( &dst[dst_pos] , ch) ; + } + else if( ! ml_char_combine( &dst[dst_pos] , ml_char_bytes( ch) , ml_char_size( ch) , ml_char_font( ch) , ml_char_font_decor( ch) , - ml_char_fg_color( ch) , ml_char_bg_color( ch)) ; + ml_char_fg_color( ch) , ml_char_bg_color( ch))) + { + #ifdef DEBUG + kik_warn_printf( KIK_DEBUG_TAG + " combining failed.\n") ; + #endif + } } else { @@ -1331,6 +1359,11 @@ int comb_pos ; ml_char_t * ch ; + if( ! ml_is_char_combining()) + { + return 0 ; + } + src_len = line->num_of_filled_chars ; if( ( src = ml_str_alloca( src_len)) == NULL) { @@ -1420,6 +1453,9 @@ return logical_char_index ; } +/* + * this should be called before ml_imgline_stop_visual_indian() + */ int ml_iscii_convert_logical_char_index_to_visual( ml_image_line_t * line , Index: src/ml_iscii.c =================================================================== RCS file: /home/ken/cvsroot/mlterm/src/ml_iscii.c,v retrieving revision 1.2 diff -u -r1.2 ml_iscii.c --- src/ml_iscii.c 2002/01/04 04:02:06 1.2 +++ src/ml_iscii.c 2002/01/04 21:10:34 @@ -20,7 +20,7 @@ #ifdef USE_IND -/* --- static functions --- */ +/* --- static variables --- */ static char font_name[256] ; static char font_name_prefix[256] ; @@ -32,17 +32,31 @@ static struct a2i_tabl a2i_map[A2IMAXLEN] ; static int a2i_map_size ; +/* used for iitkeyb */ static char prev_key[512] ; /* --- global functions --- */ int -ml_iscii_init( +ml_iscii_init(void) +{ + return 1 ; +} + +int +ml_iscii_final(void) +{ + return 1 ; +} + +int +ml_iscii_set_lang( char * default_lang ) { char * p ; + int counter ; if( ( glyph_map_size = indian_init( glyph_map , default_lang , font_name_prefix , ":")) == -1) { @@ -54,12 +68,17 @@ * font name is assumed not to be abbriviated. */ p = font_name_prefix ; - - while( ! isdigit( *p)) + + for( counter = 0 ; counter < 7 ; counter ++) { + if( ( p = strchr( p , '-')) == NULL) + { + return 0 ; + } + p ++ ; } - + *(p ++) = '\0' ; while( isdigit( *p)) @@ -76,12 +95,6 @@ return 1 ; } -int -ml_iscii_final(void) -{ - return 1 ; -} - char * ml_iscii_get_font_name( u_int font_size @@ -121,12 +134,16 @@ keymap = ISCIIKEY_NONE ; } } - else if( keymap == ISCIIKEY_IITKEYB) + else /* if( keymap == ISCIIKEY_IITKEYB) */ { if( ( a2i_map_size = readkeymap( a2i_map , "iitkeyb" , ":")) == -1) { keymap = ISCIIKEY_NONE ; } + else + { + memset( prev_key , 0 , sizeof( prev_key)) ; + } } } @@ -166,7 +183,7 @@ snprintf( iscii , ascii_len + 1 , "%s" , ins2iscii( a2i_map , dup , a2i_map_size)) ; } - else + else /* if( keymap == ISCIIKEY_IITKEYB) */ { iitk2iscii( a2i_map , dup , prev_key , a2i_map_size) ; snprintf( iscii , strlen( dup) + 1 , "%s" , dup) ; @@ -184,19 +201,26 @@ return ascii_len ; } + #else /* USE_IND */ int -ml_iscii_init( - char * default_lang - ) +ml_iscii_init(void) { return 0 ; } int ml_iscii_final(void) +{ + return 0 ; +} + +int +ml_iscii_set_lang( + char * default_lang + ) { return 0 ; } Index: src/ml_iscii.h =================================================================== RCS file: /home/ken/cvsroot/mlterm/src/ml_iscii.h,v retrieving revision 1.1 diff -u -r1.1 ml_iscii.h --- src/ml_iscii.h 2002/01/04 03:49:42 1.1 +++ src/ml_iscii.h 2002/01/04 22:08:53 @@ -9,6 +9,13 @@ #include <kiklib/kik_types.h> +/* + * !! Notice !! + * ISCII state is shared globally , so you cannot use multiple ISCII langs + * at the same time. + */ + + typedef enum ml_iscii_keymap { ISCIIKEY_NONE , @@ -18,9 +25,11 @@ } ml_iscii_keymap_t ; -int ml_iscii_init( char * default_lang) ; +int ml_iscii_init(void) ; int ml_iscii_final(void) ; + +int ml_iscii_set_lang( char * default_lang) ; char * ml_iscii_get_font_name( u_int font_size) ; Index: src/ml_shaping.c =================================================================== RCS file: /home/ken/cvsroot/mlterm/src/ml_shaping.c,v retrieving revision 1.7 diff -u -r1.7 ml_shaping.c --- src/ml_shaping.c 2002/01/04 06:51:44 1.7 +++ src/ml_shaping.c 2002/01/04 21:31:42 @@ -4,6 +4,7 @@ #include "ml_shaping.h" +#include <stdio.h> /* fprintf */ #include <string.h> /* strncpy */ #include <kiklib/kik_mem.h> /* alloca */ @@ -331,6 +332,24 @@ font_filled = ml_iscii_convert_to_font_index( font_buf , dst_len , iscii_buf) ; + #ifdef __DEBUG + { + int i ; + + for( i = 0 ; i < iscii_filled ; i ++) + { + fprintf( stderr , "%.2x " , iscii_buf[i]) ; + } + fprintf( stderr , "=>\n") ; + + for( i = 0 ; i < font_filled ; i ++) + { + fprintf( stderr , "%.2x " , font_buf[i]) ; + } + fprintf( stderr , "\n") ; + } + #endif + for( counter = 0 ; counter < font_filled ; counter ++) { ml_char_set_bytes( &dst_shaped[counter] , &font_buf[counter] , 1) ; Index: src/ml_term_manager.c =================================================================== RCS file: /home/ken/cvsroot/mlterm/src/ml_term_manager.c,v retrieving revision 1.76 diff -u -r1.76 ml_term_manager.c --- src/ml_term_manager.c 2002/01/04 03:49:42 1.76 +++ src/ml_term_manager.c 2002/01/04 20:53:47 @@ -1398,16 +1398,18 @@ ml_set_word_separators( value) ; } + ml_iscii_init() ; + if( ( value = kik_conf_get_value( conf , "iscii_type"))) { - if( ! ml_iscii_init( value)) + if( ! ml_iscii_set_lang( value)) { - ml_iscii_init( "Malayalam") ; + ml_iscii_set_lang( "Malayalam") ; } } else { - ml_iscii_init( "Malayalam") ; + ml_iscii_set_lang( "Malayalam") ; } term_man->cmd_path = NULL ; @@ -1489,6 +1491,7 @@ #endif ml_keymap_final( &term_man->keymap) ; ml_termcap_final( &term_man->termcap) ; + ml_iscii_final() ; ml_sig_child_final() ; ml_remove_sig_child_listener( term_man) ; |
From: Araki K. <j00...@ip...> - 2002-01-05 23:51:43
|
Hi, Next test release with ISCII support is here => [tar archive] http://www.geocities.co.jp/SiliconValley-Cupertino/6461/mlterm-2.2.0-pre20020106.tar.gz [patch to cvs current] http://www.geocities.co.jp/SiliconValley-Cupertino/6461/mlterm-2.2.0-pre20020102-pre20020106.patch.gz COMPLETE LIST 1. Many minor bugs are fixed , which results in less core dump. 2. Design is cleaned up. More ISCII related codes are shared with Bidi and Arabic shaping codes. 3. ISCII languages can be dynamically changed from mlconfig. 4. Each pty window has its own ISCII state. This enables you to use different ISCII languages among multiple pty windows. TODO and BUG LIST 1. sometimes core dumps around ml_convert_ascii_to_iscii() when multiple pty windows are opened. 2. lines which contains ISCII characters cannot do auto wraparound. (this is quite difficult to solve...) BTW , I sincerely would like native people's comments whether the design , the implementation or the behavior of mlterm ISCII support is ok or not. I'm still fumbling my way now... Best Regards. -- kiken j00...@ip... |
From: Jyotirmoy S. <jm...@cs...> - 2002-01-06 09:55:54
|
Hi, On Sun, 6 Jan 2002, Araki Ken wrote: : [tar archive] : http://www.geocities.co.jp/SiliconValley-Cupertino/6461/mlterm-2.2.0-pre20020106.tar.gz I've downloaded it and also installed it. I've run the configure script using --enable-iscii option. After installing it, i've run it using the following command: mlterm -X=false -V -E iscii -w 16 -C Malayalam Before installing mlterm, I did install libind.tar.gz, truetype.tar.gz and xfstt and also installing indian.h in /usr/lib. Then I pressed Alt_R for ISCII inputting. But I was not able to see any Indian language glyphs! Did I skip any step in installing it? Again, I've seen that -C option for choosing the language doesn't verify an invalid parameter to it. I've given any arbitray string (like XYZ, abc etc) to it and saw it working without showing any error message. I think it should give an error message in case of an invalid parameter; isn't it? : 3. ISCII languages can be dynamically changed from mlconfig. How do you I use mlconfig? Again, Gtk is not installed in my machine? Is Gtk is necessary in order to install mlterm? : BTW , I sincerely would like native people's comments whether the design , : the implementation or the behavior of mlterm ISCII support is ok or not. Surely I'd like to do that. :-) With best regards. Jyotirmoy --------------------------------------------------------------- Jyotirmoy Saikia | Phone: +91-512-597114 (Hall) D312/Hall-IV | 597608 (CSE lab) IIT Kanpur | E-mail: jm...@cs... PIN-208016 | js...@ya... U.P., India | Homepage: http://www.cse.iitk.ac.in/users/jms ----------------------------------------------------------------- |
From: Araki K. <j00...@ip...> - 2002-01-06 10:09:35
|
Hi, Subject: Re: [Mlterm-dev-en] mlterm ISCII support 2002/01/06 From: Jyotirmoy Saikia <jm...@cs...> Message-ID: <Pin...@cs...> Date: Sun, 6 Jan 2002 15:26:40 -0500 (EST) > I've downloaded it and also installed it. I've run the configure script > using --enable-iscii option. Oh , I'm very sorry. ./configure --help shows --enable-iscii iscii[disabled] but --enable-ind option , which I wrote in <200...@pd...> , is correct. I forgot to fix it. > How do you I use mlconfig? > Again, Gtk is not installed in my machine? Is Gtk is necessary in order to > install mlterm? gtk+ is not necessary to build mlterm , but mlconfig , a configuration menu , depends on gtk+. mlconfig is started if you press control key button 3. Best Regards. -- kiken j00...@ip... |