mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
Use pango_context_get_metrics instead of loading the font.
2002-02-13 Anders Carlsson <andersca@gnu.org> * src/theme.c (meta_pango_font_desc_get_text_height): Use pango_context_get_metrics instead of loading the font.
This commit is contained in:
parent
c6ebcae729
commit
0ed0c3bab6
@ -1,3 +1,8 @@
|
|||||||
|
2002-02-13 Anders Carlsson <andersca@gnu.org>
|
||||||
|
|
||||||
|
* src/theme.c (meta_pango_font_desc_get_text_height): Use
|
||||||
|
pango_context_get_metrics instead of loading the font.
|
||||||
|
|
||||||
2002-02-12 Anders Carlsson <andersca@gnu.org>
|
2002-02-12 Anders Carlsson <andersca@gnu.org>
|
||||||
|
|
||||||
* src/frames.c (meta_frames_manage_window): Set prelit_control
|
* src/frames.c (meta_frames_manage_window): Set prelit_control
|
||||||
|
10
src/theme.c
10
src/theme.c
@ -4664,16 +4664,12 @@ meta_pango_font_desc_get_text_height (PangoFontDescription *font_desc,
|
|||||||
PangoContext *context)
|
PangoContext *context)
|
||||||
{
|
{
|
||||||
PangoFontMetrics *metrics;
|
PangoFontMetrics *metrics;
|
||||||
PangoFont *font;
|
|
||||||
PangoLanguage *lang;
|
PangoLanguage *lang;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
font = pango_context_load_font (context, font_desc);
|
|
||||||
lang = pango_context_get_language (context);
|
lang = pango_context_get_language (context);
|
||||||
metrics = pango_font_get_metrics (font, lang);
|
metrics = pango_context_get_metrics (context, font_desc, lang);
|
||||||
|
|
||||||
g_object_unref (G_OBJECT (font));
|
|
||||||
|
|
||||||
retval = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) +
|
retval = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) +
|
||||||
pango_font_metrics_get_descent (metrics));
|
pango_font_metrics_get_descent (metrics));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user