Tuesday, January 15, 2008

Cursor size and Telugu

Assuming you are using a Gnu/Linux box with input methods(mostly scim) available to input many of the Indic scripts and have Lohit fonts installed. Open gedit and start typing anything. Now keep changing the keyboard layout to write something in each language say Marathi, Gujarati, Gurmukhi, Tamil and so on. Don't worry if you don't know the languages, just type garbage. You will notice that most of the scripts supported by Lohit fonts are more or less scaled to each other.

Now try typing Telugu. Still the size is scaled? Yes, they look matched in size. But did you notice the hight of that cursor? This is an issue with Telugu that even though the font on average looks scaled properly, the cursor size is not. And thus the spacing between two lines is also unexpectedly large. Of course you can reduce the size of the cursor by reducing font size, but it still remains out of proportion to the glyph sizes and thus giving ugly line spacing.

It appears that the cursor size is determined by Pango depending upon the highest and lowest glyph present in the font. So I played around with glyph sizes and cursor sizes. When I added an extra long (fake) glyph into a normal sized font, the resulting cursor size for such a font was proportional to this longest glyph. When removed this glyph, the cursor size returned to normal.

In case of Telugu, too many glyphs appear to go beyond a normal hight and depth. I don't know how often these glyphs are used and how important are they. Fixing the problem means truncating or scaling down these awful glyphs. But I am not sure which of them can be truncated or scaled down how much and so on. This will need a help of both the language expert and a calligrapher. Hope someone redesigns this font in a better way.