GNOME Bugzilla – Bug 571056
Title bar cuts of indic-telugu text with descenders
Last modified: 2010-08-16 13:23:06 UTC
Title bar height or text baseline should be modified such that when the title bar displays complex text like (indic- telugu), the complex text is clearly visible. Complex text has descenders for certain characters. Currently they are cropped. Actually this problem is there in all window title bars. Gedit is being used as an example to illustrate the problem. Other information: Enable Indic-telugu and open text editor, observe the title bar display of the default file name in telugu and the way it appears on the file tab. The second character has a descender like a flattened out U, which is cut off in the title bar.
Created attachment 128304 [details] title bar cutting of descenders in gedit. same in other applications like firefox
reassigning to metacity: the window manager takes care of drawing the window frame
Any Pango experts reading this? Metacity calculates the height thus: PangoFontMetrics *metrics; PangoLanguage *lang; lang = pango_context_get_language (context); metrics = pango_context_get_metrics (context, font_desc, lang); retval = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) + pango_font_metrics_get_descent (metrics)); pango_font_metrics_unref (metrics); According to http://library.gnome.org/devel/pango/unstable/pango-Fonts.html#PangoFontMetrics the ascent plus the descent *ought* to be the greatest possible height of any character in the font. Is this a misinterpretation on Metacity's part, or is this a problem with the font or with Pango?
When the text displayed contains multiple languages, the height calculation may be defaulting to English, which is not sufficient for other language text. The logic also may not be be using the locale settings to determine the appropriate height. I have also observed this problem in other applications like GIMP text tool as well when working with telugu fonts. Even more difficult situation is encountered In Firefox Search bar or Wikipedia search bar, where the text can be entered in different languages and no run time adjusting of bar height is possible, the height may need to be determined based on the loca le or default language setting and the font applicable for that.Even Google search bar from its home page is not acommodating this requirement, when language setting is set to Telugu.
(In reply to comment #3) > Any Pango experts reading this? Metacity calculates the height thus: Posted it to gtk-i18n-list
Thomas, you can always CC me. Your code looks right for the language in question. Is the locale language correctly set from gdm? That is, is metacity running under the correct language? The other problem can be a bad font. :(
Thanks Behdad for your feedback. I found the desktop title font to be Dejavu Sans Book 10 pt as the reason for the problem. When I changed it to telugu font Lohit-telugu, the window title show complete Telugu title with proper descenders. The problem with Google or wikipedia search boxes also got resolved. So the real problem that needs fix is that when the session language is set to Telugu, the fonts are not being changed to Telugu.
In Ubuntu 10.04, the problem no longer exists, even if default fonts are not for Telugu language