Clarification on Font size calculation using Pango

I have reported a bug about incorrect title bar sizing when displaying indic-telugu text on title bar.

The question mark is pointed to pango as the below extract from the above bug shows.
Any feedback will be helpful in addressing this usability feature which must be impacting several languages in Linux.

------- Comment #3 from Thomas Thurman  2009-02-09 16:34 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

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?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]