> 
> Another question: What is the use of the concept of "four console character
> cells", "double cell width" etc.. for scripts that have various cellwidths?
> (like burmese) Shouldn�t one cell always be large enough to fit the char?
> Isn�t it better to always put one character into one cell, and instead
> increase or decrease the cell width? I guess that is what the concept of
> cells are used for... I mean there is no use to have multiple cells for one
> char. It is like selecting the left part of an "M" or the rigth part of an
> "Z". Why would one like to do something like that?

Yes, I agree, it is stupid.  But it already exists for CJK because the CJK 
characters
have too many strokes to be readable in low-resolution bitmap fonts used on the 
console.
So somebody decided to just use two character cells and that solved most of the 
problem
for CJK.  Terminals like mlterm obviously have the code built-in to 
automatically select
both cells of a CJK character, so the same could be done for other scripts like
Burmese or Devanagari.  One difference might be that for CJK the terminal's 
code can
simply check whether a character's Unicode value falls into one of the CJK 
ranges, but
for scripts like Burmese or Devanagari a terminal might have to check character 
by 
character to find out the proper width (0,1,2,3,4 cells).  

When I wrote my own 
ConsoleStringWidth() function, I did just this kind of thing: (1) First I 
perform range checks on a character's Unicode value to see if it falls into one 
of the
CJK ranges which use double width, 
then, if necessary, (2) I look up the value in an STL MAP where KEY=(Unicode 
Value) and
VALUE=(Console cell width as 0 or 2).  If the key is not found in the map, then 
the
default width of 1 console cell applies.  The STL MAP, instantiated the first 
time
the ConsoleWidth() function is called, 
can easily be expanded to include keys for Burmese characters with cells widths 
of 3 or
4 if need be.  But I would have to create the GNU Unifont bitmap glyphs for 
Burmese
first and decide what widths they should be.  Because of the CTL (Complex Text 
Layout)
requirements of Burmese, I just decided to forget about it for now ...

> 
> By the way, I think the burmese script is the most beautiful and elegant
> script in the world. And it would be wonderful if it could be used in linux
> terminals. Not only because of its eastethic features but I think also it
> would be important for the connectivity and development in Myanmar. And
> increased connectivity could have many other possitive effects for that
> country for many reasons.
> 
> Martin
> 
> 
> --
> Linux-UTF8:   i18n of Linux on all levels
> Archive:      http://mail.nl.linux.org/linux-utf8/
> 
> 
>


--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to