Detailed Exploration of the Problem in VTE

31 Mar
Exploration of Problem as per discussions from Bugzilla
In Gedit, the whole text is rendered as a single unit, as
it's proportional by nature. So, the rendering engine is
free to interact between character cells, including
reordering and composing conjuncts as required by Indic
and other CTL scripts.

Terminals, on the other hand, are display grid, where
individual characters are put in grid. And the grid cells
are independent of one another. That's how it works from
the beginning. This is fine for Latin and CJK, and
probably for Thai-Lao with typewriter convention applied.
But it needs a tremendous change to support complex text
like Indic and Arabic, where adjacent display cells must
interact with one another. So, such deep structural change
is not an easy task. It even deserves a redesign.

One solution can be rendering the Indic languages can be
doing it in a way that our traditional typewriters do.
We followed this Idea and pursued this idea for

Problem exploration at Code Level:
I am not explaining the exact code path, I will
explain it later posts, but I am explaining the VTE
internals at higher level.

Whenever a character is to be inserted onto the screen
there are event handlers for key press, key release and
for output from process to be shown. These are taken in
chunks. These chunks are queued and then processed.
Information regarding the chunk of data is computed i.e.
number of Unicode characters, length of the chunk,
sequence handler,etc. It then it calls the insert_char
function. In code view as per our convention, insert_char
is lower level code and actual rendering call
cairo_show_glyph is at higher level.

So at lower level,character is inserted in the respective
fixed width column of the screen and cairo_show_glyph call
does the rendering on that column at higher level.

So now the "deadlock" problem occurs. Rendering of Indic
languages require variable width cell structure. Variable
width can be handled at higher level which we have tried
to implement with partial success. When variable width is
implemented in higher level lower level doesn't know
about the variable width structure, because it is
designed for fixed width cell structure. It does all the
processing as fixed width character cell. And we can't
vary the cell width at lower level.

I also tried with integrating the pango calls for
rendering, but the same loop problem persists. I am
trying my best to solve the problem.
Leave a comment

Posted by on March 31, 2011 in Project


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: