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.
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.
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 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.
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.
1. Kulkarni Mihir (email@example.com)
2. Kulkarni Swapnil (firstname.lastname@example.org)
3. Dige Sourabh (email@example.com)
Prof. Abhijit A.M. (College Of Engineering, Pune).
Pravin A. , Pravin S. , Behdad.