From c6be38602145fbc6a7813c3cb073723a8dd55968 Mon Sep 17 00:00:00 2001 From: Andrew Innes Date: Sat, 21 Oct 2000 13:29:45 +0000 Subject: [PATCH] (w32_load_system_font): Call w32_cache_char_metrics. (w32_unload_font): Free per_char array if present. --- src/w32fns.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/w32fns.c b/src/w32fns.c index d25b4b16abd..d394fb3b81a 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5430,6 +5430,7 @@ w32_load_system_font (f,fontname,size) return NULL; font = (XFontStruct *) xmalloc (sizeof (XFontStruct)); + bzero (font, sizeof (*font)); /* Set bdf to NULL to indicate that this is a Windows font. */ font->bdf = NULL; @@ -5464,6 +5465,8 @@ w32_load_system_font (f,fontname,size) ? VARIABLE_PITCH : FIXED_PITCH); lf.lfOutPrecision = ((font->tm.tmPitchAndFamily & TMPF_VECTOR) ? OUT_STROKE_PRECIS : OUT_STRING_PRECIS); + + w32_cache_char_metrics (font); } UNBLOCK_INPUT; @@ -5592,6 +5595,7 @@ w32_unload_font (dpyinfo, font) { if (font) { + if (font->per_char) xfree (font->per_char); if (font->bdf) w32_free_bdf_font (font->bdf); if (font->hfont) DeleteObject(font->hfont); -- 2.39.2