From bfcae3ac7e2426925f671b42843fb7e88003deee Mon Sep 17 00:00:00 2001 From: Hans Breuer Date: Mon, 5 Jun 2006 18:16:30 +0000 Subject: [merged from HEAD] not only handle PANGO_GLYPH_EMPTY but also 2006-06-05 Hans Breuer [merged from HEAD] * pango/pangocairo-win32font.c(compute_glyph_extents) : not only handle PANGO_GLYPH_EMPTY but also PANGO_GLYPH_UNKNOWN_FLAG. The latter is needed to have proper sizing of the "hex box" for missing glyphs. It also stops cairo complaining about unknown glyphs. Fixes part of bug #343796. --- ChangeLog | 8 ++++++++ pango/pangocairo-win32font.c | 11 ++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dc94e68e..24b5c6d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-06-05 Hans Breuer + [merged from HEAD] + * pango/pangocairo-win32font.c(compute_glyph_extents) : not only + handle PANGO_GLYPH_EMPTY but also PANGO_GLYPH_UNKNOWN_FLAG. + The latter is needed to have proper sizing of the "hex box" for + missing glyphs. It also stops cairo complaining about unknown glyphs. + Fixes part of bug #343796. + 2006-05-31 Behdad Esfahbod Bug 341138 – Using TTC font, Gtk2 programs begin to eating big memory diff --git a/pango/pangocairo-win32font.c b/pango/pangocairo-win32font.c index 1a14a205..c564bbb4 100644 --- a/pango/pangocairo-win32font.c +++ b/pango/pangocairo-win32font.c @@ -212,7 +212,16 @@ compute_glyph_extents (PangoFont *font, logical_rect->width = 0; logical_rect->height = (font_extents.ascent + font_extents.descent) * PANGO_SCALE; - if (glyph != PANGO_GLYPH_EMPTY) + if (glyph == PANGO_GLYPH_EMPTY) + { + /* already initialized above */ + } + else if (glyph & PANGO_GLYPH_UNKNOWN_FLAG) + { + /* space for the hex box */ + _pango_cairo_get_glyph_extents_missing(cfont, glyph, ink_rect, logical_rect); + } + else { cairo_glyph.index = glyph; cairo_glyph.x = 0; -- cgit v1.2.1