[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I have an idea for vte and gnome-terminal arabic support
- To: "Development Discussions" <developer at arabeyes dot org>
- Subject: I have an idea for vte and gnome-terminal arabic support
- From: "Muayyad AlSadi" <alsadi at gmail dot com>
- Date: Mon, 12 May 2008 21:01:52 +0300
Actually I have three ideas
method one:
in the vte source code we have a file src/vtexft.c we have a function called
_vte_xft_draw_text
it divides the request into runs of same fonts then call
glyphs[j].glyph = XftCharIndex (data->display, font, requests[i].c);
to convert chars to glyphs
and here we should inject our code
instead of requests[i].c we use shaped_chars[i]
which is the shaped form of requests[i].c (using fribidi2 or IBM's ICU
or even my mu)
or even replace the entire XftCharIndex with pango_shape
(and of course ./configure should be told to use xft implementation of vte)
method two:
in the vtepangox.c or vtepango.c
_vte_pango_x_draw_text or _vte_pango_draw_text
we have something like
for (i = 0; i < n_requests; i++) {
length = g_unichar_to_utf8(requests[i].c, buf);
pango_layout_set_text(data->layout, buf, length);
gdk_draw_layout(draw->widget->window, data->gc,
requests[i].x, requests[i].y,
data->layout);
}
replace that to work on the whole run (having same y for example) by having buf
buf[VTE_UTF8_BPC*MAX_RUN_LENGTH]
in a way similar to vtexft.c
instead of
buf[VTE_UTF8_BPC];
(and of course ./configure should be told to use pango/pangox
implementation of vte)
method three:
having an entire implementation
So, what is the next step!
how can help me do any of those things or suggest something to me