From: Jason Rumney Date: Mon, 26 May 2008 10:41:58 +0000 (+0000) Subject: (w32font_text_extents): Zero whole metrics struct first. X-Git-Tag: emacs-pretest-23.0.90~5294 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba93d6842e6ee631c3a613aef63f4878f78de422;p=emacs.git (w32font_text_extents): Zero whole metrics struct first. --- diff --git a/src/ChangeLog b/src/ChangeLog index f9a137c290e..c67bd19a295 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-05-26 Jason Rumney + + * w32font.c (w32font_text_extents): Zero whole metrics struct first. + 2008-05-25 Kenichi Handa * w32term.c (x_draw_glyph_string): Fix calculation of underline diff --git a/src/w32font.c b/src/w32font.c index 273d98a40e3..22d8c26d069 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -358,10 +358,9 @@ w32font_text_extents (font, code, nglyphs, metrics) { struct w32font_info *w32_font = (struct w32font_info *) font; - metrics->width = 0; + bzero (metrics, sizeof (struct font_metrics)); metrics->ascent = font->ascent; metrics->descent = font->descent; - metrics->lbearing = 0; for (i = 0; i < nglyphs; i++) {