Hello,
I'm a student of Indian Institute of Technology Kanpur, doing my masters
in Computer Sc & Engineering. We're modifying the Rxvt so that it supports
Indian languages also.
We are having some problem in using the screen structure(as in rxvtlib.h)
for Indian languages! Before going into the details, I'll like to tell you
about the Indian language code and the fonts.
We're using ISCII(Indian Scripting Code for Information Interchange) code
for storing Indian language codes. ISCII is an 8-bit code of which lower 7
bits are same as ASCII. So ISCII provides support for both English and
Indian language code.
Similarly, each glyph is of one byte size.
But there is no one-to-one correspondence between the character
codes(ISCII codes) and the glyphs for the following reasons:
1) sometime a single character code may cause a combination of glyphs to
be displayed.
2) sometime more than one character code may lead to only a single glyph
to be displayed!
Unlike English where fonts are of fixed width, Indian script font
characters are of *variable widths*, and the characters may be glued
horizontally or vertically!
Now the screen structure divides the screen into fixed rows and
columns(say 24 rows and 80 columns). Since the glyphs of Indian languages
are of variable widths and there is no one-to-one correspondence between
character codes and fonts, each line in the screen will be of variable
length if we fix the column size. For example, in a particular line when
the character codes have occupided 80 columns, the actual number of
columns used by the glyphs in the screen may be 45(some glyphs even have
zero widths); in another case when the chacracter codes have occupied 80
characters, the actual number of columns used by the glyphs may be 60 and
so on! It'll surely look bad in that case.
I've seen that rxvt supports Chinese, Korean and Japanese languages. What
character code is used for these languages? Is it Unicode or something
else? Again, I've seen that these languages have *multicharacter glyphs*.
But I don't know whether the glyphs are of variable width also in these
cases. Isn't it a problem for these languages if you divide the screen
into some fixed rows and columns?
We are thinking of an alternative to dividing the screen into rows and
columns. We've thought that instead of using a two dimensional array(as
you've used *text* in the screen structure), we take a one dimensional
array and use the end-of-line as the row seperator.
rxvt_scr_add_lines: will put characters(including end-of-line) into
the internal store
rxvt_scr_refresh: will put the characters from the internal store into
X..but now it'll look for the end-of-line character
in the internal store to go into the next row.
Do you think this solution will be viable? Or is it the case that we don't
have to go for this and we can continue with the present screen structure?
Waiting eagerly for your suggestions/comments.
Thanks and regards.
Jyotirmoy Saikia