summaryrefslogtreecommitdiff
path: root/pango/pangocairo-font.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-04-11 08:31:44 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-04-11 08:31:44 +0000
commit2fc8c1c04664645ed397c034ee532c41d0f3941e (patch)
tree0aa9bbb653bbfc1eb68bfad4971c169fb6a7b216 /pango/pangocairo-font.c
parent834d6435a8c91dcbebc7665b84811725a74f8b54 (diff)
downloadpango-2fc8c1c04664645ed397c034ee532c41d0f3941e.tar.gz
Bug 337924 – cleanups for issues reported by various compilers Patch
2006-04-11 Behdad Esfahbod <behdad@gnome.org> Bug 337924 – cleanups for issues reported by various compilers Patch from Kjartan Maraas. * examples/viewer-x.c (update): * modules/arabic/arabic-fc.c (fallback_shape), (arabic_engine_shape): * modules/basic/basic-fc.c (fallback_shape), (basic_engine_shape): * modules/basic/basic-x.c: * modules/hangul/hangul-fc.c: * modules/hebrew/hebrew-fc.c (hebrew_engine_shape): * modules/indic/indic-fc.c: * modules/khmer/khmer-fc.c: * modules/syriac/syriac-fc.c: * modules/thai/thai-fc.c: * modules/tibetan/tibetan-fc.c: * pango/break.c: * pango/modules.c: * pango/opentype/ftglue.c (_hb_ftglue_face_goto_table): * pango/pango-attributes.c (pango_attr_list_filter): * pango/pango-engine.c: * pango/pango-fontset.c: * pango/pango-layout.c (pango_layout_set_text), (pango_layout_xy_to_index), (pango_layout_get_cursor_pos): * pango/pango-markup.c (text_handler): * pango/pango-utils.c (read_alias_file): * pango/pangocairo-fcfont.c (G_DEFINE_TYPE_WITH_CODE): * pango/pangocairo-fcfontmap.c (G_DEFINE_TYPE_WITH_CODE): * pango/pangocairo-font.c (_pango_cairo_font_get_hex_box_info): * pango/pangox-fontmap.c (pango_x_make_matching_xlfd): * tests/dump-boundaries.c (fail): Remove unused variables. Remove excess semicolon after DEFINE_TYPE macros.
Diffstat (limited to 'pango/pangocairo-font.c')
-rw-r--r--pango/pangocairo-font.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pango/pangocairo-font.c b/pango/pangocairo-font.c
index 8c68922c..bc5e6057 100644
--- a/pango/pangocairo-font.c
+++ b/pango/pangocairo-font.c
@@ -131,8 +131,10 @@ _pango_cairo_font_get_hex_box_info (PangoCairoFont *cfont)
double height = 0;
cairo_font_extents_t font_extents;
PangoFontDescription *mini_desc, *desc;
- cairo_scaled_font_t *scaled_font, *scaled_mini_font;
-#ifndef HAVE_CAIRO_SCALED_FONT_TEXT_EXTENTS
+ cairo_scaled_font_t *scaled_font;
+#ifdef HAVE_CAIRO_SCALED_FONT_TEXT_EXTENTS
+ cairo_scaled_font_t *scaled_mini_font;
+#else
cairo_surface_t *surface;
cairo_t *cr;
#endif
@@ -224,7 +226,6 @@ _pango_cairo_font_get_hex_box_info (PangoCairoFont *cfont)
mini_cfont = (PangoCairoFont *) mini_font;
- scaled_mini_font = _pango_cairo_font_get_scaled_font (mini_cfont);
#ifndef HAVE_CAIRO_SCALED_FONT_TEXT_EXTENTS
surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 1, 1);
@@ -239,6 +240,7 @@ _pango_cairo_font_get_hex_box_info (PangoCairoFont *cfont)
c[0] = hexdigits[i];
#ifdef HAVE_CAIRO_SCALED_FONT_TEXT_EXTENTS
+ scaled_mini_font = _pango_cairo_font_get_scaled_font (mini_cfont);
cairo_scaled_font_text_extents (scaled_mini_font, c, &extents);
#else
cairo_text_extents (cr, c, &extents);