Devanagari support on GNOME Terminal

06 Jan


We are Currently working on the Devanagari support on GNOME terminal as our B.Tech. project. Gnome terminal is vital and commonly used application in Linux. There are problems in rendering complex scripts like Devanagari.  Our work deals with the improvement in rendering the Devanagari scripts. We have done part of it but facing some problems.


The following screen shot we had taken before making changes to the Virtual Terminal  Emulator code. We typed the word “swapnil” on VTE and it rendered as shown in the screen shot.

Previous VTE

The following screen shot is taken after we made changes to the VTE. VTE renders the Devanagari properly to some extent but not perfectly as in gedit or Open Office, etc.

Updated VTE

Rendering in VTE

VTE is Virtual Terminal Emulator Library(version 0.25.1). Gnome Terminal uses this Library. VTE does rendering using pango and cairo. Pango and cairo support complex scripts  but VTE is designed for fast rendering and for that it uses cell structure(grid of cells).

In VTE, each glyph is rendered on each cell. There is no interaction between the two cells. This works perfectly for the languages like English because it doesn’t require any interaction with adjacent cells. But in case of Devanagari we have to interact with the previous cells for composite characters or ligatures.

Work We Have Done

We started our work with reading source code of gnome terminal. We got some part of it. We came to know that gnome terminal is using virtual terminal emulator(VTE) library. So we focused on VTE source code.

We gone through bugs 584160 and 321490 and some related bugs at gnome-bugzilla as suggested by Behdad(Developer of VTE). That helped us to exact part of the code that is used for the rendering.

We understood the rendering part of the code. We increased the inter-cell interaction. VTE was fixed for the zero-width characters(े,ु,ू,ै,े,etc) already we just extended it for non zero-width characters(ि,ी,ौ,etc.) and composite characters also. What we have done in this case is we append these non zero-width characters that require one complete cell and some part of the next cell depending on the width of that character and move cursor to the next cell due to which some space is left out empty that makes the word rendered in discontinuous manner.

We have uploaded the .diff files here. We have also added the comments that will help to understand the changes we have made and why those changes are made.

Problems that need to be solved
After the work that is done up till now there are some problems that are yet to be fixed as explained earlier. The problems that we are currently facing:-
1. The cell width needs to be adjusted properly for characters that require fractional widths (1.5 times cell width). This has been explained earlier.

2. We can not make any changes to the grid structure to vary cell size because grid structure is uniform and gets defined prior to rendering.

Probable solutions
1. We can do this in the way as it is done in pre-edit. In pre-edit it stores the characters in the buffer and when the complete word is formed, it is rendered.

Project Group

1. Kulkarni Mihir (

2. Kulkarni Swapnil (

3. Dige Sourabh (

Project Guide

Prof. Abhijit A.M. (College Of Engineering, Pune).

Thanks to

Pravin A. , Pravin S. , Behdad.


Posted by on January 6, 2011 in Project


9 responses to “Devanagari support on GNOME Terminal

  1. Praveen Arimbrathodiyil

    January 6, 2011 at 11:25 am

    Thanks for writing your progress and your interesting in fixing one of the most recurring requests.

    I think it does not require a full fledged sourceforge project, because gnome already have all the infrastructure for managing it. I suggest you to submit the patch for review on gnome bugzilla itself.

    It would be nice to have the bug numbers clickable.

    PS: you could have used echo command, so that it would not result in an error, but that is just nitpicking 🙂

  2. Ujjwol

    January 6, 2011 at 1:14 pm

    Go for it! Great Work!

  3. Nishandh

    January 6, 2011 at 1:21 pm

    Thankyou very much for the efforts. Hope the implementation would follow soon…

  4. Aditya Godbole

    January 6, 2011 at 5:29 pm

    This is great work. Keep up the good work. And many many thanks for working on this problem. Eagerly looking forward to your changes going mainstream.

  5. Indic Language Computing at College of Engineering, Pune

    January 7, 2011 at 9:55 am

    we have submitted a patch on gnome bugzilla on bug 584160

  6. Dinesh

    January 16, 2011 at 10:34 pm

    Hey guys good work.
    can you post the link to the version of source files you are using ?


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: