After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 571056 - Title bar cuts of indic-telugu text with descenders
Title bar cuts of indic-telugu text with descenders
Status: RESOLVED OBSOLETE
Product: metacity
Classification: Other
Component: general
2.24.x
Other All
: Normal minor
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2009-02-09 15:57 UTC by arjuna rao chavala
Modified: 2010-08-16 13:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
title bar cutting of descenders in gedit. same in other applications like firefox (64.46 KB, image/png)
2009-02-09 16:12 UTC, arjuna rao chavala
Details

Description arjuna rao chavala 2009-02-09 15:57:13 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.
Comment 1 arjuna rao chavala 2009-02-09 16:12:14 UTC
Created attachment 128304 [details]
title bar cutting of descenders in gedit. same in other applications like firefox
Comment 2 Paolo Borelli 2009-02-09 16:16:32 UTC
reassigning to metacity: the window manager takes care of drawing the window frame
Comment 3 Thomas Thurman 2009-02-09 16:34:10 UTC
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?
Comment 4 arjuna rao chavala 2009-02-10 16:07:58 UTC
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.
Comment 5 arjuna rao chavala 2009-02-11 15:52:28 UTC
(In reply to comment #3)
> Any Pango experts reading this?  Metacity calculates the height thus:
Posted it to gtk-i18n-list
Comment 6 Behdad Esfahbod 2009-02-12 02:15:52 UTC
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. :(
Comment 7 arjuna rao chavala 2009-02-14 05:25:28 UTC
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.

Comment 8 arjuna rao chavala 2010-08-16 05:44:25 UTC
In Ubuntu 10.04, the problem no longer exists, even if default fonts are not for Telugu language