RSS

Monthly Archives: January 2011

Devanagari support on GNOME Terminal

Abstract

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.

Screenshots

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 (mihirk.31@gmail.com)

2. Kulkarni Swapnil (swapnilkulkarni.cofsug@gmail.com)

3. Dige Sourabh (sourabhdige@gmail.com)

Project Guide

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

Thanks to

Pravin A. , Pravin S. , Behdad.

 
9 Comments

Posted by on January 6, 2011 in Project