From ba93d6842e6ee631c3a613aef63f4878f78de422 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 26 May 2008 10:41:58 +0000 Subject: [PATCH] (w32font_text_extents): Zero whole metrics struct first. --- src/ChangeLog | 4 ++++ src/w32font.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) 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++) { -- 2.39.2