Re: Thai/Devanagari in GNOME Terminal
- From: Ralph Giles <giles snow ashlu bc ca>
- To: Robert Brady <robert suse co uk>
- Cc: Chookij Vanatham <chookij vanatham eng sun com>, gtk-i18n-list gnome org
- Subject: Re: Thai/Devanagari in GNOME Terminal
- Date: Mon, 23 Oct 2000 13:34:19 -0700 (PDT)
On Mon, 23 Oct 2000, Robert Brady wrote:
> > Regarding table/tab stop, in Thai terminal emulator, we use this method
> > to make sure that table/tab-stop are still rendered correctly.
> > This method we call "compensation". Here is the detail.
>
> [snipped]
>
> That sounds non-ideal, unless I misunderstand, it breaks cursor
> positioning, line lengths and so on.
Robert, I don't see what you mean about this breaking things. It sounds
like a particular implementation of the "justification" heuristics I
posited.
Chookij, please correct me, but here's what I understood about
compensation:
These Thai terminals have two character widths, one and zero. Zero-width
characters (like vowels and tonemarks) combine with the previous cell,
modifying the glyph there displayed. Whenever two spaces are sent in a
row, the terminal automagically advances the cursor to the position it
would have occupied if there were no combining characters. That way
applications can calculate line lengths and appropriate cursor positions
assuming one character is one cursor position as is conventional, and
generate correct results 80% of the time. Additionally, applications can
trigger the compensation behavior directly by sending a special character
(should be an escape sequence?) to take care of the remaining 20% of the
cases.
For example, consider the following table. Forgive the english--I'm not
familiar with thai script.
-1- -2-
brown fox
gray cat
yellow partridge
If we imagine writing this with zero-width vowels we get:
-1- -2-
brwn fx
gry ct
yllw prtrdg
The columns no longer align. If we apply the two-space compensation
trigger:
-1- -2-
brwn fx
gry ct
yllow prtrdg
Except for the case where only a single space separates the columns, the
spacing is correct.
Sorry for the pedantry. Constructing examples helps me understand...
-r
--
giles ashlu bc ca
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]