diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | pango/pangocairo-win32font.c | 11 |
2 files changed, 18 insertions, 1 deletions
@@ -1,3 +1,11 @@ +2006-06-05 Hans Breuer <hans@breuer.org> + [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 <behdad@gnome.org> 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; |