[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: Re: libvte and Arabic language support]



FYI

-------- Original Message --------
Subject: Re: libvte and Arabic language support
Date: Tue, 9 Sep 2003 15:18:37 -0400
From: Nalin Dahyabhai <nalin at redhat dot com>
Organization: Red Hat, Inc.
To: anmar at canada dot com
References: <3F5BFC95 dot 4070705 at arabeyes dot org>

On Sun, Sep 07, 2003 at 08:50:45PM -0700, Anmar Oueja wrote:
I was wondering if libvte, used to render text in gnome-terminal, can display Arabic letters (bidi and shaping) ?

Currently the terminal doesn't do either -- it's barely removed from the traditional "one character, one cell" approach (it's more like "one gunichar, one or two cells").

If not, we are interested in persuing a fix.

Cool!


Do you see this as a major understaking ? Any advice would be greatly appreciated.

It might be. I haven't investigated if fully, so much of this is speculation, but my understanding of things has been that proper bidi and shaping support was computationally expensive (and that this was the main reason why Pango wasn't a viable choice for the terminal's rendering needs, and why the terminal now uses Xft or freetype directly for drawing text).

In the past, I also have wondered if implementing bidi support was even
a good idea in a terminal.  Most emulators don't handle it at all, so I
suspect that applications are working around this limitation by
performing all of the necessary work themselves and then outputting text
in left-to-right form only.

Now that I give it some more thought, I realize that such applications
wouldn't be sending direction-changing marks, so the terminal wouldn't
interfere with them at all, so it's a good idea.  There's even a spec
for how terminals are supposed to handle bidi somewhere (ECMA TR 53,
which I need to read), and that makes it sound better.

Shaping, though, is something that I haven't got a good handle on.  At
first glance it looks prohibitively expensive to do, particularly for
the more complicated scripts out there.  So my first thought is to not
touch it.  I'm willing to be persuaded differently, though, especially
if it can be done cheaply.

Cheers,

Nalin